Advertisement
Guest User

123

a guest
Nov 27th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using std::cout;
  4. using std::cin;
  5. using std::endl;
  6.      
  7. #include <string>
  8.  
  9. using std::string;
  10. using std::getline;
  11.  
  12.  class GradeBook
  13.  {
  14.        public:
  15.               void displayMessage( string className )
  16.               {
  17.                    cout << "Weclome to the Grade Book of " << className << endl;
  18.                    }
  19.               };
  20.              
  21.               int main()
  22.               {
  23.                   GradeBook myGradeBook;
  24.                   string nameOfClass;
  25.                  
  26.                   cout << "Write your name class: " << nameOfClass << endl;
  27.                   getline( cin, nameOfClass );
  28.                   cout << endl;
  29.                  
  30.                   myGradeBook.displayMessage( nameOfClass );
  31.                   return 0;
  32.                   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement