COS110 Tutorial 3 -11August2011-MEMO

COS110 Tutorial 3 -11August2011-MEMO - University of...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 University of Pretoria COS110 Tutorial 3 MEMO-MEMO-MEMO Date: 3 August 2011 Time: 50 minutes Marks: 40 Student Surname and Initials:__________________________________________________ Student number:_______________________ Employee number:_____________________ Question 2: (Topic: inline implementaion of classes) [10 marks] Given the following class definition: class GradeBook { public: GradeBook(string name) { courseName = name; } void setCourseName(string name) { courseName = name; } string getCourseName() { return courseName; } void displayMessage() { cout << "Welcome to the Grade Book for " << courseName << "!" << endl; } private: string courseName; };
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon