[SOLVED] SOLVED:Polymorphism Lab solution

20.99 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Polymorphism_Lab.zip (279 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

The source code for Student, CollegeStudent, and HighSchoolStudent are already provided. You will be creating a class ElementarySchoolStudent, which inherits from Student and writing the rest of the source code for main in the StudentDriver class.

Print the following menu:

Choose one of the following:

1. Create an Elementary School Student

2. Create a High School Student

3. Create a College Student

4. Print out all students

5. Exit

If the user decides to create a HighSchoolStudent, the user will be prompted for the appropriate information (name, age, address, high school name, counselor name, year and grade point average), and then create a HighSchoolStudent object by calling the constructor with this information:

Each object created will be put into an ArrayList.

To print out all students, call the printStudent() method for each student in the array.

ElementarySchoolStudent

Inherits from Student
Look at driver to determine what instance variables will be needed for the ElementarySchoolStudent class.
Provide a constructor that has parameters for all the information required for a ElementarySchoolStudent and a default (no-arg) constructor
Provide getters and setters
Provide a toString method

Take a screenshot of “Print out all students” after adding at least one Elementary School, High School and College student.

Upload your StudentDriver.java and your screenshot.

  • Polymorphism_Lab.zip