Jesse Just

Greenhorn
+ Follow
since Aug 09, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jesse Just

hello I have to write a program for class and I am having trouble with it the parameters are :

Create a program that simulates a standard Cash Register that meets the following requirements:

1) Stores separate sales tax rates for food and non-food items. The rate for food items will be 3% and the rate for non-food items will be 7%.
2) The program will prompt the user to select the tax type of the item (food or non-food) and then to enter the price of the items
3) The program will ask the user after each item whether the user wants to enter another item. If the user selects yes then the program should repeat prompting the user for item type and price.(See Requirement 2) If the user selects no then the program will stop prompting for item entry.
4) The program will then display the price for each item, the subtotal, calculate the two separate sales taxes and display each, and then display a total (all item prices and taxes).
5) The program will then prompt the user to enter the amount tendered by the customer and then display the amount of change owed the customer including a breaking down the change owed in dollars, quarters, dimes, nickels and pennies.

Hints

Create an Item class that is made up from an Item Type (food or non-food) and and Item Price. Then create an array of Item objects. Item Type could be represented by a Boolean variable called something like “isFoodItem” where true indicates it is a food item and false indicates it is a non-food item.


I am not to sure on how to call the items from the array individually and display them with the tax. I would like to create a method to do all the calculations and then print it out. Here is what I have so far in my program and the object class.





any help would be much appreciated!

10 years ago