EBK C HOW TO PROGRAM
EBK C HOW TO PROGRAM
8th Edition
ISBN: 9780133964639
Author: Deitel
Publisher: PEARSON CUSTOM PUB.(CONSIGNMENT)
Question
Book Icon
Chapter 16, Problem 16.11E
Program Plan Intro

Program plan:

1 .courseName and instructorNamevariables are used for inputs

2.GradeBook() constructor gets the name of course and its instructor

3. void setCourseName() stores the value of course name to class variable

4. string getCourseName() returns the course name

5. void setInstructorName() stores the value of instructor to class variable

6. void getInstructorName() returns the instructor name

7. void displaymessage() provides the information about course and its instructor

Program description:

The main purpose of the program is to allow user to store the course name and instructor name using constructor. It allows to update the course name and instructor name using setter and getter functions. Finally, it displays the course and instructor name information.

Blurred answer
Students have asked these similar questions
state the statement either true or false.
(Modifying Class GradeBook) Modify class GradeBook (Figs. 16.11–16.12) as follows:a) Include a second string data member that represents the course instructor’s name.b) Provide a set function to change the instructor’s 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 instructor’s name.Use your modified class in a test program that demonstrates the class’s new capabilities.
Write in C++ Language.   (Employee Record): Create a class named 'Staff' having the following members: Data members - Id – Name - Phone number – Address - AgeIt also has a function named 'printSalary' which prints the salary of the staff.Two classes 'Employee' and 'Officer' inherits the 'Staff' class. The 'Employee' and 'Officer' classes have data members 'Top Skill' and 'department' respectively. Now, assign name, age, phone number, address and salary to an employee and a officer by making an object of both of these classes and print the same.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning