Skip to content

Commit 77b6929

Browse files
committed
Create ResumeMain.java
1 parent 69eee04 commit 77b6929

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

Resume/ResumeMain.java

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
Write a program to generate the resume. Create 2 Java classes Teacher (data: personal
3+
information, qualification, experience, achievements) and Student (data: personal information,
4+
result, discipline) which implements the java interface Resume with the method biodata().
5+
*/
6+
7+
package Resume;
8+
9+
import java.util.*;
10+
11+
interface Resume {
12+
void biodata();
13+
}
14+
class Teacher implements Resume {
15+
private String name;
16+
private String dob;
17+
private String qualification;
18+
private int experience;
19+
private String achievements;
20+
21+
public void biodata() {
22+
Scanner sc=new Scanner(System.in);
23+
System.out.println("Enter name");
24+
name=sc.nextLine();
25+
System.out.println("Enter dob in dd-mm-yyyy");
26+
dob=sc.next();
27+
System.out.println("Enter Qualification");
28+
qualification=sc.next();
29+
System.out.println("Enter Experience in years");
30+
experience=sc.nextInt();
31+
System.out.println("Enter Achievements");
32+
achievements=sc.next();
33+
}
34+
35+
public void putData() {
36+
System.out.println("Name: "+name);
37+
System.out.println("D.O.B: "+dob);
38+
System.out.println("Qualification: "+qualification);
39+
System.out.println("Experience: "+experience);
40+
System.out.println("Achievements: "+achievements);
41+
}
42+
}
43+
class Student implements Resume {
44+
private String name;
45+
private String dob;
46+
private String result;
47+
private String discipline;
48+
public void biodata() {
49+
Scanner sc=new Scanner(System.in);
50+
System.out.println("Enter name");
51+
name=sc.nextLine();
52+
System.out.println("Enter dob in dd-mm-yyyy");
53+
dob=sc.nextLine();
54+
System.out.println("Enter result");
55+
result=sc.nextLine();
56+
System.out.println("Enter discipline");
57+
discipline=sc.nextLine();
58+
sc.close();
59+
}
60+
public void putData() {
61+
System.out.println("Name: "+name);
62+
System.out.println("D.O.B: "+dob);
63+
System.out.println("Result: "+result);
64+
System.out.println("Discipline: "+discipline);
65+
}
66+
}
67+
68+
public class ResumeMain {
69+
public static void main(String[] args) {
70+
Teacher t1=new Teacher();
71+
t1.biodata();
72+
t1.putData();
73+
Student s1=new Student();
74+
s1.biodata();
75+
s1.putData();
76+
}
77+
}

0 commit comments

Comments
 (0)