Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a C++ project in Visual Studio 2010 to display a GUI similar to the follo

ID: 3535052 • Letter: C

Question

Create a C++ project in Visual Studio 2010 to display a GUI similar to the following:Â


(Figure 1)


When the user clicks on either Good or Bad mood, the program should display a message in aÂ

message box related to the user’s mood.


When the Good button is clicked, it displays:Â


(Figure 2)


When the Bad button is clicked, the program displays:Â


(Figure 3)


The minimal requirement for the program is: Once in the initial screen (Figure 1) the user chooses aÂ

mood and clicks on it, it displays the corresponding mood message in a message box (Figure 2 orÂ

3), and once the user clicks on OK on this message box, the program quits execution. If this is theÂ

case, in order to display the initial screen (Figure 1), you will need to start the program again.

Explanation / Answer

Hi, after adding a label and two button, add this to the Form1.h (or whatever your form's name is ) file: private: System::Void btnGood_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show("Go out and share your happiness with friends", "Good Mood Message", MessageBoxButtons::OK); } private: System::Void btnBad_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show("Helping others can make you fell better", "Bad Mood Message", MessageBoxButtons::OK); } };