Question: 1. Person (abstract class) that has the following: Data Fields: private String name, private String address Constructor: Constructor to create a Person object with specified
Answer all the questions: B1. Given the following classes, answer the below questions 1. Person (abstract class) that has the following: Data Fields: private String name, private String address Constructor: Constructor to create a Person object with specified name and address Methods: Access and mutatok methods for all data field 2. Student (extend the class Person) that has the following: Data Fields: private int ID, private double rade Constructori Constructor to create a Student object with specified name, adress, ID & grade Methods: Accessor and mutator methods for all data fields 3. Director (extend the class Person) that has the following: Data Fies:private double salary Constructori Condor to create a Direct object with specified name, address and salary, Methods: access and mutator methods for salary data fidd. 4. Graduate Studentextend the class Student) that has the following: Data Fields Constructor: Constructor to create a Graduate Student object with specified name address, ID, and grade Methods: Design UML diagram for the above claves Write the code only for class Person and Class Student
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
