Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project 2 - Grade Book System 1 Overview n software development projects, it is important to be able to identify objects and classes in a
Project 2 - Grade Book System 1 Overview n software development projects, it is important to be able to identify objects and classes in a project description. Equally important is the ability to follow a systematic approach to creating a solution to the problem. In this project, you are asked to utilize the design skills discussed in class to develop a solution to a programming problem. Learning Objectives . Modular development with classes . Class . Text menu driver . Input/output Prerequisites o complete this project, you need to make sure that you have the following: . C++ and the g++ compiler . A C++ IDE or text editor (multiple editors exist for developers) An understanding of the material presented in class. . An understanding of the material covered in ZyBooks. Project Description ou are to implement a program scheduling a doctor's daily schedule. The list of requirements and constraints for the system are as follows: 1. The system will be used to manage grades of various students in a class 2. The name of each student is unique and can be used to locate the information on a specific patient or time slot.3. User can print all grade information. Code organization Read the provided files for detailed instructions on each class, and class members! main.cpp The main entry point of the executable. Set up the app class and run it. Provided file, do not modify! Grade Class he class to handle information of a single grade (one grade per student) Gradebook Class The class to manage grades. TextMenuApp Class the main application class the drives a text menu based program. When reading in the student's name, make sure you handle the getline after extraction problem! Find the reference here Ex. makefile he makefile is provided. Do not modify! mplementation Notes Download the provided files here & . You may run the main-linux under Linux or WSL to try how the program works. All header files are provided. They provided the information about that needs to be implemented. Do not modify them. Make the corresponding cpp files as needed. Follow the file naming convention. You can run make or make main to compile your app and execute using . /main A makefile rule named test is provided and you can run it using make test to run the provided tests on the Grade and GradeBook classes. Run make testrun to reproduce the sample run shown in the instruction.#ifndef GRADEBOOK HPP #define GRADEBOOK HPP #include "grade. hpp" #include class GradeBook { std: : string courseName; Grade grades [40]; // hold 40 grades at most, assuming it is enough int count = 0; public: // default constructor GradeBook ( ) ; // parameterized constructor to set the initial values of all instance variables GradeBook (const std: : string &courseName) ; // getter of the count of students int getCount( ) const; // getter of the course name std: : string getName() const; // add a new grade // do not worry about the size limit void addGrade(const std: : string &name, double grade); // search the grade by student's name // return -1 if not found int searchStudent(const std: : string &name) const; // print the student's info providing a valid index // assuming that the index is valid (get from the search) // ask the Grade object to print void printStudent(int studentIndex) const; // print a summary of the course like: // Gradebook of course COP 3014 // Name: John Smith | Grade: 90.0 // Name: Laura Johnson | Grade: 83.0 // Name: Josh Brown | Grade: 77.0 // ask each Grade object to print itself void print() const; #endif // GRADEBOOK HPP#ifndef GRADE APP #define GRADE HPP #include class Grade { std: : string studentName; double grade; public: // default constructor Grade ( ) ; // parameterized constructor to set the initial values of 11 all instance variables Grade(const std: : string &name, double grade) ; // getter of the student's name std::string getName () const; // getter of the grade double getGrade() const; // print the grade info in the format like: 1 1 Name: Jerry Williams | Grade: 78.0 // should display one decimal place void print() const; #endif // GRADE HPP1. Print all grades; 2. Print a single grade; 3. Add a new grade; 4. Exit. Please choose an option (1-4): 1 Gradebook of course COP 3014 Name: John Smith | Grade: 90.0 Name: Laura Johnson | Grade: 83.0 Name: Josh Brown | Grade: 77.0 1. Print all grades; 2. Print a single grade; 3. Add a new grade; 4. Exit. Please choose an option (1-4) : 2 Please input the student name: Bad Name Name not found! Please input an existing name Please input the student name: John Smith Name: John Smith | Grade: 90.0 1. Print all grades; 2. Print a single grade; 3. Add a new grade; 4. Exit. Please choose an option (1-4) : 3 Please input the name of the student: Jerry Williams Please input the grade: 123 The grade should be with in the range from @ to 100 Please input the grade: -5 The grade should be with in the range from @ to 100 Please input the grade: 78 1. Print all grades; 2. Print a single grade; 3. Add a new grade; 4. Exit. Please choose an option (1-4): 1 Gradebook of course COP 3014 Name: John Smith | Grade: 90.0 Name: Laura Johnson | Grade: 83.0 Name: Josh Brown | Grade: 77.0 Name: Jerry Williams | Grade: 78.0 1. Print all grades; 2. Print a single grade; 3. Add a new grade; 4. Exit. Please choose an option (1-4): 4 Thank you for using the app!#ifndef TEXT MENU APP HPP #define TEXT MENU APP HPP #include "gradebook. hpp" #include class TextMenuApp { GradeBook &gradeBook; public: // Provided constructor 11 initialize the gradeBook instance variable explicit TextMenuApp(GradeBook &gradeBook) : gradeBook(gradeBook) {}; // drives the main logic of the text menu app void run (); #endif // TEXT_MENU APP HPP
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