Question: (JAVA) Write a class encapsulating the concept of a Student Employee, assuming that a student has the following attributes: last name, first name, id, array

(JAVA) Write a class encapsulating the concept of a Student Employee, assuming that a student has the following attributes: last name, first name, id, array of hours worked weekly. Include a constructor, the accessors and mutators, and method toString. Also code the following methods (separately): one method to calculate the total weekly hours, average them, and return the average; another method to add a weeks hours to the array of hours (increasing the size of the array- create a new larger array, copy the old values into it and add new hours). Write a client class to create 2 student objects and test all your methods.

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!