Help me please i need to write a program and have no idea how to get this started if anyone has any ideas or can help me in anyway i would really appreciate it.
I have posted the assignment under this so please and thank you
Write a fruit store shopping cart program. First, ask user’s information (name,
address, phone number).
Then, display the menu:
1. Orange $1.00 each
2. Banana $2.00 each
3. Tomato $3.00 each
4. Grape $2.50 each
5. Pear $10.00 each
6. Lemon $0.50 each
7. Finish shopping
Let the user shop as many times as he/she wants until he/she enters number ‘7’
to exit. Then, the program calculates the total price before tax.
At the end, print a receipt on display and save to a file include user’s information,
purchase items, total price before tax, discount, tax, and total price with tax (just
like those receipt from HEB).
If you have homework it would really benefit you to read the accompanying text. Generally speaking teachers don't give assignments without having imparted the required information (Unless they are miserable people who enjoy initiating failure). This will employ working with floating point variables, getting user data, using file streams, and looping. If you have covered this material in class then you should be able to at least make an initial go at it. Go ahead and then post the code here and we can help you out if you get confused.
I believe you can also use a switch statement to create the menu. Whenever I'm starting off with an assignment and I'm not sure where to start, I write down what needs to happen on a piece of paper and ideas on how to make it happen using the code I know. Then whatever I don't know, I look it up in the textbook. If you don't know much about switch statements, then definitely read up on that. You'll have to essentially create a function that adds up what the user chooses to buy each time they choose that specific case. Then an 'exit/calculate balance' function when they choose menu option #7. As far as saving the information to a file, you'll have to look into incorporating fstream into your code. There is a lot to learn about both of these topics. Hope that helps !