Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions