Question
In java language create a Person class and a Student class that inherits from the Person class. The Person class must have private data items
In java language 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 private 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started