Question
(my error message is line 27 #includeGradeBook.h no such file or directory) I'm using codeBlock. can anyone help me understand what am I missing ?
(my error message is line 27 #include"GradeBook.h" no such file or directory) I'm using codeBlock. can anyone help me understand what am I missing ?
(Modifying Class GradeBook) Modify class GradeBook (Figs. 3.113.12) as follows:
a) Include a second string data member that represents the course instructors name.
b) Provide a set function to change the instructors name and a get function to retrieve it.
c) Modify the constructor to specify course name and instructor name parameters.
d) Modify function displayMessage to output the welcome message and course name, then the string This course is presented by: followed by the instructors name.
Use your modified class in a test program that demonstrates the classs new capabilities.
I wrote the program as follow (my error message is line 27 #include"GradeBook.h" no such file or directory)
#include
using std::string;
class GradeBook { Public: GradeBook (string,string) void setCourseName(string); string getCourseName ();
void setInstructorName(string); string getInstructorName();
void displayMessage();
private: string courseName; string instructorNmae;
};
#include
using std::cout; using std::endl; #include"GradeBook.h"
#include using std::cout; using std::endl;
#include "GradeBook.h"
GradeBook::GradeBook(string course, string instructor) { setCourseNmae(course); setInstructorName(instructor);
}
void GradeBook::getCourseName(string name) { courseName=Introduction to Engineering and Computing; }
string GradeBook::getCourseName()
{ return courseName;
}
void GradeBook::setInstructorName(string name)
{ instructorName=Professor XY ; }
string Gradebook::getInstructorName() { return instructorName; }
void GradeBook::displayMessage()
{ cout
}
int main() { GradeBook gradebook("Introduction to Engineering and Computing");
cout
couit 1 // Fig. 3.12: GradeBook.cpp 2 // GradeBook member-function definitions. This file contains 3 //implementations of the member functions prototyped in GradeBook.h. 4 #include
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