Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.29 KB | None | 0 0
  1. public class main {
  2.  
  3.     public static void main(String[] args) {
  4.         Scanner scan = new Scanner(System.in);
  5.         Student student;
  6.         Employee employee;
  7.         Professor professor;
  8.         String fn;
  9.         String ln;
  10.         int a;
  11.         String am;
  12.         double s;
  13.         String cn;
  14.        
  15.         fn = scan.nextLine();
  16.         scan.nextLine();
  17.         ln = scan.nextLine();
  18.         scan.nextLine();
  19.         a = scan.nextInt();
  20.         scan.nextLine();
  21.         am = scan.nextLine();
  22.         scan.nextLine();
  23.         student = new Student(am, fn, ln, a);
  24.  
  25.         fn = scan.nextLine();
  26.         scan.nextLine();
  27.         ln = scan.nextLine();
  28.         scan.nextLine();
  29.         a = scan.nextInt();
  30.         scan.nextLine();
  31.         s = scan.nextDouble();
  32.         scan.nextLine();
  33.         employee = new Employee(s, fn, ln, a);
  34.  
  35.         fn = scan.nextLine();
  36.         scan.nextLine();
  37.         ln = scan.nextLine();
  38.         scan.nextLine();
  39.         a = scan.nextInt();
  40.         scan.nextLine();
  41.         s = scan.nextDouble();
  42.         scan.nextLine();
  43.         cn = scan.nextLine();
  44.         scan.nextLine();
  45.         professor = new Professor(cn, s, fn, ln, a);
  46.  
  47.         student.printInfo();
  48.         employee.printInfo();
  49.         professor.printInfo();
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement