Question
USE JAVA CODE FOR THIS PROGRAM Notes: Course class: The toString method returns the name of the course, the instructor, and the final average grade
USE JAVA CODE FOR THIS PROGRAM
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.
Implement the following UML diagram. Note that the abstract class is indicated with italics and shading.- Course - courseName : String+ - instructor : String - finalGrade double // represents the final average course grade + setName (n : String) : void-' + getNane ): String + setFinalGrade (g double: void t getFinalGrade : double* + setInstructor (instr: string) : void-' + getInstructo : String + abstract calulateFinalGrade () : void // abstract method + toString ( ) : String ComputerSciencev - grades double. - nuncrades : int + Computerscience (nun : int) + ge s( ) : double[]. + addcrade ( grade : double ) : void' + calculateFinalGrade(): void' + toStrin + tostring ) : stringStep 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