Question
Add an abstract class called Person to your project Add the following public properties to your Person class: (String) name (int) age Add another class
Add an abstract class called Person to your project
Add the following public properties to your Person class:
(String) name
(int) age
Add another class called Employee that inherits from Person and add the following public properties:
(double) salary
(int) yearsOfService
Add another class called Student that inherits from Person and add the following public properties:
(ArrayList) grades
(int) yearInSchool
(String) major
In the Student class create a method called getAverage() that will cycle through all grades in the array list and return the average. Note: if you want to know the number of elements in an array list it is: grades.size() This is equivalent to an arrays .length
Add another class of your choosing and include appropriate properties to the class
For all classes include:
A single workhorse constructor
toString() method
can someone tell me how to do this one?I totally have no idea.....
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