-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainClass_Ploymorphism.java
41 lines (31 loc) · 1.12 KB
/
MainClass_Ploymorphism.java
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
package Practice.poly_morphism;
import static java.lang.System.out;
public class MainClass_Ploymorphism
{
public static void main(String[] args)
{
Poly_Morphism p = new Poly_Morphism();
//Student_polymorphism student = new Student_polymorphism();
// Employ_polymorphism employee = new Employ_polymorphism();
Poly_Morphism obj = new Student_polymorphism();
//student.Show_info();
//p.Show_info();
//employee.Show_info();
p.name = "Dilbar";
p.Surname = "Malik";
p.Cnic = "43103-9024655-5";
p.age = 17;
p.Show_info();
obj.Show_info();
obj.Show_info2();
out.println("Output is:-\n\n\n\n\n\n");
// student.cmsid= "023-20-0155";
// student.departement = "Computer Science";
//student.gpa = 3.4;
// student.Surname = "Malik";
//// student.name = "Dilbar";
// student.Show_info2();
// out.println("\n\n\n\n\n\n");
// student.Show_info();
}
}