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
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