Assume below basic skeleton of Student and GradeBook class: public class GradeBook { private String courseName; private Student[] students; // ... other methods .... } public class Student{ private int id; private String name; int marks[]; // marks in different tests } Encapsulate fields and defined needed constructors. Then, make a GradeBook object and fully initialize it based on user input. Get number of students from user input. As number of tests each student given may be different, so your program shall take number of tests and marks in each test, form user input too. You can also generate and use random number to quickly initialize whole data, instead of getting from user, but choose decent ranges e.g. maximum marks 100, maximum students 50 and maximum number of test each student may give shall be less or equal to 10. After fully initializing the GradeBook object, print following information: Which student given maximum number of test, print student id Who got maximum average marks, print student id. Average marks of the class Average marks of each student in the class Minimum marks of each student, print marks and student id Maximum marks of each student,  print marks and student id Average, minimum and maximum marks of the student (get student from user) Some methods shall be written in Student class and some inside the GradeBook class, decide the best place for a method based on what it does. Perform all listed tasks in different methods and call those methods from the main method in GradeBook test class.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Assume below basic skeleton of Student and GradeBook class:
public class GradeBook {
private String courseName;
private Student[] students;
// ... other methods .... }
public class Student{
private int id;
private String name;
int marks[]; // marks in different tests }
Encapsulate fields and defined needed constructors. Then, make a GradeBook object and fully initialize it based on user input. Get number of students from user input. As number of tests each student given may be different, so your program shall take number of tests and marks in each test, form user input too. You can also generate and use random number to quickly initialize whole data, instead of getting from user, but choose decent ranges e.g. maximum marks 100, maximum students 50 and maximum number of test each student may give shall be less or equal to 10. After fully initializing the GradeBook object, print following information:
  1. Which student given maximum number of test, print student id
  2. Who got maximum average marks, print student id.
  3. Average marks of the class
  4. Average marks of each student in the class
  5. Minimum marks of each student, print marks and student id
  6. Maximum marks of each student,  print marks and student id
  7. Average, minimum and maximum marks of the student (get student from user)
Some methods shall be written in Student class and some inside the GradeBook class, decide the best place for a method based on what it does. Perform all listed tasks in different methods and call those methods from the main method in GradeBook test class.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT