Created
October 13, 2016 12:43
-
-
Save splitline/682abc4f9112be8c795e603a8b5ebd2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Fig.3.1:fig03_01.cpp | |
//Define class GradeBook with a member function displayMessage, | |
//cteate a Gradebook object, and call its display Message function. | |
#include<iostream> | |
using namespace std; | |
//GradeBook class definition | |
class Gradebook | |
{ | |
public: | |
//function that displays a welcome message to the GradeBook user | |
void displayMessage() const | |
{ | |
cout << "Welcome to the Grade Book!" << endl; | |
}; // end function displayMessage | |
}; // end class GradeBook | |
//function main begins program execution | |
int main() | |
{ | |
Gradebook myGradeBook; // create a Gradebook object named myGradeBook | |
myGradeBook.displayMessage(); // call object's displayMessage function | |
} // end main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment