C#C
C#3y ago
Sea_Salt

❔ New to C# and want help with the last part of my assignment

Write a C# console application program: Shopping cart program

Question:
You have an online store selling fruits. First, you have to ask user input name, phone number, address, and email. Second, you have to display the menu on the screen.
Oranges $2, Apples $3, tomatoes $5, bananas $0.5, pears $10, grapes $4.8
*Then, the program asks the user how many does the user want for each item and calculate the subtotal.
Final, you have to show items and the subtotal before tax, tax, and total on the screen and display user’s information and thank you messages at the end.


The part I need help with is calculating the subtotal and subtotal + tax

to my understanding i need o create a object method inside of FruitCost.cs in order to calculate the total price and print it out to the user but the multiple ways ive tried it never returns the total correctly or I'm given an error.

P.S
other classes and work have taken up a lot of time so im rushing to get this done
Screenshot_2023-06-18_172159.png
Screenshot_2023-06-18_172223.png
Screenshot_2023-06-18_172244.png
Was this page helpful?