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...


B1. Given the following classes, answer the below questions.<br>1. Person (abstract class) that has the following:<br>Data Fields: private String name, private String address<br>Constructor: Constructor to create a Person object with specified name and address.<br>Methods: Accessor and mutator methods for all data fields.<br>2. Student (extend the class Person) that has the following:<br>Data Fields: private int ID, private double grade<br>Constructor: Constructor to create a Student object with specified name, address, ID & grade.<br>Methods: Accessor and mutator methods for all data fields.<br>3. Director (extend the class Person) that has the following:<br>Data Fields: private double salary.<br>Constructor: Constructor to create a Director object with specified name, address, and salary.<br>Methods: Accessor and mutator methods for salary data field.<br>4. GraduateStudent(extend the class Student) that has the following:<br>Data Fields: -<br>Constructor: Constructor to create a GraduateStudent object with specified name,<br>address, ID, and grade.<br>Methods: -<br>* Design UML diagram for the above classes.<br>* Write the code only for class Person and Class Student.<br>

Extracted text: 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: Accessor and mutator methods for all data fields. 2. Student (extend the class Person) that has the following: Data Fields: private int ID, private double grade Constructor: Constructor to create a Student object with specified name, address, ID & grade. Methods: Accessor and mutator methods for all data fields. 3. Director (extend the class Person) that has the following: Data Fields: private double salary. Constructor: Constructor to create a Director object with specified name, address, and salary. Methods: Accessor and mutator methods for salary data field. 4. GraduateStudent(extend the class Student) that has the following: Data Fields: - Constructor: Constructor to create a GraduateStudent object with specified name, address, ID, and grade. Methods: - * Design UML diagram for the above classes. * Write the code only for class Person and Class Student.

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here