Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design an implement a class called Course that represents a course taken at TCNJ. A course object should keep track of up to seven students

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Design an implement a class called Course that represents a course taken at TCNJ. A course object should keep track of up to seven students (use only an array to store the students), as represented by the Student class summarized below Course Class The constructor of the Course class (only accepts the name of the course The Course object should keep track of how many valid students have been added to the course by using an instance variable of the integer type called number Provide a method called addstudent that accepts one Student reference variable and adds the student to the course. When added to a course, the student object is added to one of the positions of the student array. This is the only acceptable way to add students to a course Provide a method called roll that prints (to the screen) a listing of all of students in the course Provide a method called average that computes and returns the average of all students' test score averages Student Class The Student class should contain a single constructor, which accepts two String objects as its parameters (first and last names of the student you are creating) Each Student object will store no more than five academic scores (floating point values between 0.0- 100.0 inclusive) Provide the getScore and setScore methods which will obtain or set the score for a particular quiz (quizzes are numbered 1-5 inclusive). Both methods will need to be passed (at least a quiz number to operate properly. Only permit valid quiz scores to be set by the setScore method. Invalid scores should he discarded with a warning mes SS

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

Find vo, in the network infigure. 30 2/60 A j40 +) 1000

Answered: 1 week ago

Question

How can voice analytics be used to predict employee health?

Answered: 1 week ago

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago