Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, you will develop a program that can be used by a teacher to record the student grades in his her courses. The

image text in transcribed
In this assignment, you will develop a program that can be used by a teacher to record the student grades in his her courses. The class diagram is given below. Please note the following: A student's grade is an integer value that is between 0 and 100, inclusive. You should apply the information hiding principle when necessary. Instance variables whose values do not change after being initialized must be declared final eg., name. Use toString() in class Studentto print the relevant object's information You should define the constructors as specified. Validate the values of the instance variables when necessary Method getCourseAverage should return 0 if there is no student in the course. Method addStudent Sudent s) should return false if the student s cannot be added. A student cannot be added to a course if the course is full or if the student has already been added since no two students in a course can have the same name. Method getBestStudent should return a student with the best grade in the course. If there is no student in the course, the method should return null. - Method printStudents should print the students in the course. For each student, print the following the name and the grade. In the constructor of the class Course, define the array students as follows: students = new Student[10]; We will assume that the maximum capacity of the course is 10 students. Create a test class named CourseTest which contains the main method. In it, create several classes with several arbitrary students. Test your program and ensure that the results are correct. Course Student - students Student - name String Orade in construction Course getCourseverage int gutes Student Student Student Students, boolean .printStudents econstructor Student name: String grade in Grade grade in geraden toString String Course Test

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

LO4 Specify how to design a training program for adult learners.

Answered: 1 week ago