Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class main {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- Student student;
- Employee employee;
- Professor professor;
- String fn;
- String ln;
- int a;
- String am;
- double s;
- String cn;
- fn = scan.nextLine();
- scan.nextLine();
- ln = scan.nextLine();
- scan.nextLine();
- a = scan.nextInt();
- scan.nextLine();
- am = scan.nextLine();
- scan.nextLine();
- student = new Student(am, fn, ln, a);
- fn = scan.nextLine();
- scan.nextLine();
- ln = scan.nextLine();
- scan.nextLine();
- a = scan.nextInt();
- scan.nextLine();
- s = scan.nextDouble();
- scan.nextLine();
- employee = new Employee(s, fn, ln, a);
- fn = scan.nextLine();
- scan.nextLine();
- ln = scan.nextLine();
- scan.nextLine();
- a = scan.nextInt();
- scan.nextLine();
- s = scan.nextDouble();
- scan.nextLine();
- cn = scan.nextLine();
- scan.nextLine();
- professor = new Professor(cn, s, fn, ln, a);
- student.printInfo();
- employee.printInfo();
- professor.printInfo();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement