Question: Programming Language C++: Make NO changes to the provided code. Create a class named MessageClass with the following attributes: A. A public method called MessageBox

Programming Language C++:

Make NO changes to the provided code.

Create a class named MessageClass with the following attributes:

A. A public method called MessageBox that accepts three parameters: String, integer, and string.

Hint: Don't forget to include the three lines:

#include

#include

using namespace std;

in MessageClass.h just above the class definition.

B. Include 4 constants of type int in the header file that define Bonk, Question, Information and Wink so that main() can reference them in the call to MessageBox().

C. Create, initialize and use an array that holds the four emphasis characters, !, ?, i, and ; that align with the constants in Step B and the integer passed into the MessageBox() function.

D. In the code section of the MessageBox() method, create code that reproduces the following results:

Programming Language C++: Make NO changes to the provided code. Create a-

------------------------------------------------------------------------------------------------

Main Function Contains This Code

#include "stdafx.h" #include #include

#include "MessageClass.h"

using namespace std;

int _tmain(int argc, _TCHAR* argv[]) {

MessageClass msg;

msg.MessageBox("Welcome to Class", msg.Bonk, "Hello");

cout

msg.MessageBox("Why did the chicken cross the road", msg.Question, "Why");

cout

msg.MessageBox("To get to the other side", msg.Information, "Because");

cout

msg.MessageBox("That is all", msg.Wink, "Thank you");

cout ?? IJhy ??????????????????????????????? ? Why did the chicken cross the ro ad ? ii Because 13111111111111111 i To get to the ther side 1 1 11111111111111111111 111111 Thank you ;; That is all ; ress any ke y to continue ?d? ?a? o ? e? ?t? s? s? c? e? I-, y ?t

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!