Answered step by step
Verified Expert Solution
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
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
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