Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java In a course, a professor gives the following tests and assignments: - A lab activity that is observed by the teacher and assigned a

Java

In a course, a professor gives the following tests and assignments:

- A lab activity that is observed by the teacher and assigned a numerical score.

- A Pass/Fail test that has 10 questions. Minimum passing score is 70%.

- An essay that is assigned a numerical score.

- A final test that has 50 questions.

Write a class named CourseGrades. The class should have a GradedActivity array named grades as a field. The array should have four elements, one for each of the assignments previously described above. The class should have the following methods:

- setLab: This method should accept a GradedActivity object as its argument. This object should already hold the student's score for the lab activity. Element 0 of the grades field should reference this object.

- setPassFailTest: This method should accept a PassFailTest object as its argument. This object should already hold the student's score for the Pass/Fail test. Element 1 of the grades field should reference this object.

- setEssay: This method should accept an Essay object as its argument. This object should already hold the student's score for the Essay. Element 2 of the grades field should reference this object.

- setFinalTest: This method should accept a FinalTest object as its argument. This object should already hold the student's score for the final test. Element 3 of the grades field should reference this object.

- toString: This method should return a string that contains the numerical scores and grades for each element in the grades array.

Demonstrate the class in the program.

***This program requires multiple class files***

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

=+and non-compete agreements in three to five different countries.

Answered: 1 week ago