Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: https://www.chegg.com/homework-help/questions-and-answers/c-multiple-links-complete-project-direction-https-wwwcheggcom-homework-help-questions-answ-q69094689?trackid=w9T_XCa2 // V10A3.cpp // Creating a GradeBook object and calling its member functions. #include GradeBook.h // include definition of class GradeBook int main() {

Instructions: https://www.chegg.com/homework-help/questions-and-answers/c-multiple-links-complete-project-direction-https-wwwcheggcom-homework-help-questions-answ-q69094689?trackid=w9T_XCa2

// V10A3.cpp // Creating a GradeBook object and calling its member functions. #include "GradeBook.h" // include definition of class GradeBook

int main() { // create GradeBook object GradeBook myGradeBook("CISP400 Object Oriented programming");

myGradeBook.displayMessage(); // display welcome message myGradeBook.inputGrades(); // read grades from user myGradeBook.displayGradeReport(); // display report based on grades system("PAUSE"); } // end main

// GradeBook.h // GradeBook class definition that counts letter grades. // Member functions are defined in GradeBook.cpp #include // program uses C++ standard string class using namespace std;

// GradeBook class definition class GradeBook { public: explicit GradeBook(std::string); // initialize course name void setCourseName(std::string); // set the course name std::string getCourseName() const; // retrieve the course name void initializeData(); // initialize private data void displayMessage() const; // display a welcome message void inputGrades(); // input arbitrary number of grades from user void displayGradeReport() const; // display report based on user input void calculateGrade(); // Calculate grades ~GradeBook(); // destructor void inputData(); // display prompt for input void displayAllStudentsandGrades(); void inputStudentName(); void displayStudentname();

private: std::string courseName; // course name for this GradeBook unsigned int aCount; // count of A grades unsigned int bCount; // count of B grades unsigned int cCount; // count of C grades unsigned int dCount; // count of D grades unsigned int fCount; // count of F grades char letterGrades[100]; int countGrades[6]; string studentName[100]; }; // end class GradeBook

// CISP400V10AD3.cpp - Tester DO NOT CHANGE ANYTHING ON THIS CPP // Create GradeBook object, input grades and display grade report.

// include definition of class GradeBook from GradeBook.h #include "GradeBook.h"

int main() { // create GradeBook object myGradeBook and // pass course name to constructor GradeBook myGradeBook("CISP400 Object Oriented Programming with C++");

myGradeBook.displayMessage(); // display welcome message myGradeBook.inputData(); // read names and grades from user myGradeBook.displayAllStudentsandGrades();//display student's name and grade myGradeBook.displayGradeReport(); // display report based on grades myGradeBook.~GradeBook(); // call destructor myGradeBook.displayMessage(); //try to display the destroyed object information system("PAUSE"); return 0; // indicate successful termination } // end main

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_2

Step: 3

blur-text-image_3

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago