View the step-by-step solution to:

Hello My name is Anwar Belt and this is a multi part question. I am taking a C++ course and I am not good at it. Here is my original code .

Hello My name is Anwar Belt and this is a multi part question. I am taking a C++ course and I am not good at it. My teacher is no help so I am coming here. Here is my original code .

#include <iostream>

#include <string>


using namespace std;



int main(int argc, char** argv) 

{


int selection;

//Please enter your name 


cout << "Enter Name:" << endl;


string userName;


//cin >> userName;


getline(cin, userName);


// cout << endl;


cout << "Welcome to my store," << userName <<endl;


//Please Enter Address


cout << "Enter Address:" <<endl;


string address;


getline(cin, address);



cout <<endl;


cout <<"Your address is:" << address << endl;


cout <<"Please Chose a Gaming system" << endl;


cout << "1 - XBOX 360" << endl;


cout << "2 - PS4" << endl;


cout << "3 - Nintendo Switch" << endl;


cout << "4 - Nintendo DS" << endl;


cout << "5 - Exit" << endl;


cout << "Please choose a number:" << endl;





cin >> selection;

switch (selection)

{

case 1: 

cout << "You selected XBOX 360" << endl;

break;

case 2: 

cout << "You selected PS4" << endl;

break;

case 3: 

cout << "You selected Nintendo Switch" << endl;

break;

case 4: 

cout << "You selected Nintendo DS" << endl;

break;

case 5: 

cout << "You selected to Exit" << endl;

break;

}




return 0;

}


I ran the compiler and it came back good, so the next part is I have to add functions. and the functions I have to add are.

  • Ask customers to select multiple products and quantities
  • Print the order summary, including the products, the quantities, and the total price for each product
  • Calculate and print the total price for the order


after I do that I have to Design the customer class.

  • Include at least the customer name and address for the class.
  • Create class functions to set the class variables.
  • Create class functions to get the values of the class variables.
  • additional functions as necessary.
  • Complete the following in your code:
  • Implement the new class
  • object from the new class
  • Set the customer details using the class functions
  • Use the class functions to access the customer details

and finally I have to

  • Save the provided details in arrays
  • Read from the arrays to print the order summary; that is, the products, quantities, and the total price for each product
  • Calculate and print the total price for the order

if anyone can help me I would greatly appreciate it.

Top Answer

Output:... View the full answer

Bill output2.PNG

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online