© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
5 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

I need help with the last part of an assignment
C#CC# / help
4y ago
❔ Need help with this part of a programming assignment
C#CC# / help
3y ago
✅ help with assignment
C#CC# / help
2y ago
✅ help with loops, new to c#
C#CC# / help
3y ago