I am really struggling to understand this problem! Can someone show how to work this problem out correctly? This is a C++ problem; I am using Code::Blocks; Course Name is: Introduction to Engineering and Computing; Instructor Name: Wenbin Luo
3.11 (Modifying Class GradeBook) Modify class GradeBook (Figs. 3.11–3.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.
#include<iostream>
#include<string>
using namespace std;
class GradeBook
{
private:
string courseName;
string instructor;
public:
//modification of constructor
explicit GradeBook(string, string);
void setCourseName(string);
string getCourseName() const;
//adding of function for get and set for instructor
void setInstructorName(string);
string getInstructorName() const;
void displayMessage() const;
};
// constructor to specify course name and instructor name
GradeBook::GradeBook(std::string course, string name)
{
setCourseName(course);
setInstructorName(name);
}
void GradeBook::setCourseName(string name)
{
courseName=name;
}
string GradeBook:: getCourseName() const
{
return courseName;
}
//set function to change the instructor’s name
void GradeBook::setInstructorName(string inst_name)
{
instructor=inst_name;
}
//get function to retrieve it. (The name is Taan El-Ali)
string GradeBook::getInstructorName() const
{
return instructor;
}
void GradeBook::displayMessage() const
{
cout<<"Welcome to the gradebook for
\n"<<getCourseName()<<"!"<<endl;
cout<<"\nThis course is presented
by:"<<getInstructorName()<<endl;
}//end function displayMesssage
int main()
{
GradeBook book("Introduction to Engineering and Computing","wenbin
Luo");
book.displayMessage();
return 0;
}




Codingground Compile and Execute C++ Online (GNU GCC v7.1.1) Result STDIN >Share main.cpp Execute SE+ -o main .cpp #includesiostreamx includesstring> Smain Welcome to the Introduction ering and Computing! Engi std; using name class GradeBook This course is presented by:wenbin Luo private: string courseName; string instructor; public: //modification of constructor explicit GradeBook(string, string); void setCourseName (string) ; string getcourseName)c 1 t; I r get and set for instructor void setInstructorName (string) ; string getInstructorName () const; void displayMessage() const; 11 1: onstructor to specify course name and instructor name GradeBook::GradeBook(std: :string course, string name) setCourseName (course); setInstructorName (name); void GradeBook: :setCourseName (string name) 28 29 courseName-name; 30 31 string GradeBook:: getCourseName() const 4 return courseName; 34 35 36 nction to change the instructor's name void GradeBook: :setInstructorName ( string inst_name) instructor-inst_name; W
I am really struggling to understand this problem! Can someone show how to work this problem...
Include a second string auto-implemented property that represents the name of the course’s instructor. Modify the constructor to specify two parameters—one for the course name and one for the instructor’s name. Modify method DisplayMessage such that it first outputs the welcome message and course name, then outputs "This course is presented by: ", followed by the instructor’s name. Use your modified class in a test app that demonstrates the class’s new capabilities. NOTE: You will need both a GradeBook file...
I am really struggling with this assignment, can anyone help? It is supposed to work with two files, one that contains this data: 5 Christine Kim # 30.00 3 1 15 Ray Allrich # 10.25 0 0 16 Adrian Bailey # 12.50 0 0 17 Juan Gonzales # 30.00 1 1 18 J. P. Morgan # 8.95 0 0 22 Cindy Burke # 15.00 1 0 and another that contains this data: 5 40.0 15 42.0 16 40.0 17 41.5...
I AM REALLY STRUGGLING ON THIS PROBLEM
PLEASE HELP ME CORRECT AND NEAT WORK IS MUCH APPRECIATED THANKS
(1 point) Find y as a function of t if y" - 8y + 12y = 0, y(0) = 3, y(1) = 9. yt) = Remark: The initial conditions involve values at two points.
I have this problem now and I am not sure what we are exactly supposed to be sorting in ascending order. I am in java programming two and this is my first time using Cengage (online program), so I am unaware of the problems leading up to this one. I have provided the question and the code my professor provided the class, but with COVID-19 pushing our class to online we are not getting any assistance from the professor now....
I am really struggling with quantum. Can someone
please help me with those questions
4.2. Using basic quantum concepts Pr 4.3 This problem reinforces your understanding of normalization, prob- ability densities, and mean (expectation) values. The ground state wave function for a particle in a wire is = (2/a)/2 sin(x/a). (a) Define the ground state wave function for the particle in a wire using Maple. Hint: see Appendix A. (b) Write down a mathematical expression for the normalization of the...
I am currently stuck with this portion of my assignment: Pointers review: to help determine how many fields are presented from the form at run time, the program will count the '=' signs from the QUERY_STRING and dynamically create a name_value_pairs array of cnt elements to be used by parse() and param(). Here is what to do, in order: As directed above, make a back up of the work so far and work with the new version named retrieve_form_OOP_2.cpp. These...
I am struggling with a program in C++. it involves using a struct and a class to create meal arrays from a user. I've written my main okay. but the functions in the class are giving me issues with constructors deconstructors. Instructions A restaurant in the Milky way galaxy called “Green Alien” has several meals available on their electronic menu. For each food item in each meal, the menu lists the calories per gram and the number of grams per...
Does anyone know how to do these? I am totally lost. If possible
can work be shown?
resourcercontent/2/Math%202003%20Assessment%201.pdf Name: Complete the following problems. Show all necessary work. Empirical and Quantitative Reasoning 1. Given the following data: Taskstream Assessment 1 Math 2003 70 36 38 56 46 56 46 73 32 69 48 28 44 53 48 35 51 60 70 53 58 56 515 33 62 51 44 54 66 45 Summarize the data numerically by finding (a) the measures...
I need help with this assignment, can someone HELP ? This is the assignment: Online shopping cart (continued) (C++) This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). (1) Extend the ItemToPurchase class per the following specifications: Parameterized constructor to assign item name, item description, item price, and item quantity (default values of 0). (1 pt) Public member functions SetDescription() mutator & GetDescription() accessor (2 pts) PrintItemCost() - Outputs the item name followed by...
This is a java file and I am very confused on how to do this
project! please help!!
Specifications Overview: You will write a program this week that is composed of three classes: the first class defines Ellipsoid objects, the second class defines EllipsoidList objects, and the third, Ellipsoid ListApp, reads in a file name entered by the user then reads the list name and Ellipsoid data from the file, creates Ellipsoid objects and stores them in an ArrayList of...