-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainClass.java
More file actions
47 lines (43 loc) · 1.58 KB
/
Copy pathmainClass.java
File metadata and controls
47 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package oop.basic;
import oop.Employee;
import java.util.Scanner;
public class mainClass {
public static void main(String[] args) {
Scanner sc = new Scanner((System.in));
String st;
int op;
do {
System.out.print("Select One Option :");
op = sc.nextInt();
switch (op) {
case 1 -> {
Subject student1 = new Subject("Jing", "Male", 23, "20.03.2003", "PhomePenh",
"IT", "A4", 50.0, 77.7, 66.6, 99.0, 77.6);
Subject student = new Subject();
student.Input();
student.Header();
student.Output();
student1.Output();
}
case 2 -> {
Type_Product tp = new Type_Product();
Type_Product tp1 = new Type_Product(23,44.44F,10);
tp1.Output();
tp.Input();
tp.Output();
}
case 3 -> {
Employee em = new Employee();
Employee em1 = new Employee("Serey","Male","Ld",2233F,23);
em1.Output();
em.Input();
em.Header();
em.Output();
}
default -> throw new IllegalStateException("Unexpected value: " + op);
}
System.out.print("Press yes To Continue ..!");
st=sc.next().toLowerCase();
}while(st.equals("yes"));
}
}