Question: Problem 2: Create a Person class and a Student class that inherits from the Person class. The Person class must have private data items for

 Problem 2: Create a Person class and a Student class that

Problem 2: Create a Person class and a Student class that inherits from the Person class. The Person class must have private data items for firstName and lastname. The Student class must a priate data field for gpa and a second field based on a School type (a separate class you will create) representing the school the student is attending. Create a constructor in the Student class where all this data can be passed in. Create a School class that includes private data items for name, address, city, state, and zipcode. Create a constructor where you can pass in all the data. Test the classes by creating School object and the a Student object where you can pass in the firstname, lastname, school object, and age. Display the data in the student object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!