Question: Need help with my JAVA assignment, please read the note and the question carefully Thank you. Please use inheritance Notes: Course class: The toString method

Need help with my JAVA assignment, please read the note and the question carefully Thank you. Please use inheritance

Need help with my JAVA assignment, please read the note and the

Notes:

Course class:

The toString method returns the name of the course, the instructor, and the final average grade

ComputerScience class

The constructor should initialize the array of grades

The addGrade method adds new grade values up to the total number of grade values allowed

When the array of grades is full, the method calculateFinalGrade should be called to calculate and store the final grade average

The toString method should build off of the Course toString method, adding in the maximum number of grades

Write an appropriate demo class that full tests both Course and ComputerScience classes by showing a reasonable test case.

Exercise 1 Implement the following UML diagram. Note that the abstract class is indicated with italics and shading. Course - courseName Strinq - instructor : String - finalGrade double II represents the final average course grade + setName (n : String) : void + tName ) : String + setinalGrade (g: double : void + getFinalGrade ): double, + setInstrnctex (instr: String) : void' + getInstructor: Stringt + abstract calculateFinal Gradevoid // abstract method + toString : String Co terScience - grades double - numGrades: inte + ComputerScience (num: int) + getGrades () : double []+ + addGrade ( grade : double ) : void' + calculateFinalGrade ( ) : void + tostring ( ) : String*

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!