MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / EduEmpDB

Class EduEmpDB

Programs/eduEmpDb.java:100–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99}
100public class EduEmpDB {
101 public static void main(String[] args) {
102 // TODO Auto-generated method stub
103 Scanner sc = new Scanner(System.in);
104 int choice = 0;
105 do {
106 System.out.println("Enter 1 for teacher, 2 for regular typist, 3 for casual typist, 4 for officer, 5 to exit: ");
107 choice = sc.nextInt();
108 switch (choice) {
109 case 1:
110 Teacher t = new Teacher();
111 t.getData();
112 t.displayData();
113 break;
114 case 2:
115 Regular r = new Regular();
116 r.getData();
117 r.displayData();
118 break;
119 case 3:
120 Casual c = new Casual();
121 c.getData();
122 c.displayData();
123 break;
124 case 4:
125 Officer o = new Officer();
126 o.getData();
127 o.displayData();
128 break;
129 default:
130 if (choice != 5) {
131 System.out.println("Invalid input!");
132 }
133 else if (choice == 5) {
134 System.out.println("End of program");
135 }
136 }
137 } while(choice != 5);
138 }
139}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected