Question: Problem 1 - Abstract classes and Inheritance Write a superclass Studentwith an abstract subclass PaidStudent. Extend PaidStudentinto two subclasses WorkStudyand Graduate Assistant. Every student has

Problem 1 - Abstract classes and Inheritance Write a superclass Studentwith an abstract subclass PaidStudent. Extend PaidStudentinto two subclasses WorkStudyand Graduate Assistant. Every student has a name and a major. Every paid student has a pay rate. Work study students have an hours worked. Write a method computePay( that computes the weekly pay for every paid student. A work study gets paid the hourly wage for the actual number of hours worked (hours are capped at 20). Graduate students are paid the hourly wage for 20 hours, no matter what the actual number of hours is. Supply toString()methods that that use calls to the superclass such that the string contains the name, major, and pay (where applicable) for all concrete student types. student -Name:String -Major: String toStringo PaidStudent -PAYRATE:double computePay ( Graduate Assistant WorkStudy -hours Worked:int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
