You are writing a mini-cashier’s checkout program. You should fulfill the
specifications below in
any way possible, according to what you have learnt thus far.
Part A
Your program should obtain the following information from the user upon startup:
Name of the cashier.
State that store is located in (Arizona, New York, etc)
Date (separated into day, month and year).
Part B
The program should display a welcome message to the user in the following format:
Hello [cashier name] Welcome to Cashier App.
You are currently cashing for a store located in [state].
Today’s date is [date].
The program should allow the user to enter, for an unlimited number of products
, the name of the product, the price and the quantity being purchased. The program
must calculate the amount of tax to add to the price, depending on which of the
following three states the program is being used in:
Ohio - 9%
Texas- 8%
Utah - 7%
Tennessee - 4.5%
All Others – 9.2%
After calculating the total amount owed for a single product, the program should
display the name of the product and the total and then ask the user whether or not
they would like to enter another product i.e.
Milks - $9
Would you like to enter another product?
After the user has entered all of their products, you should display a summary of the
purchases that tells the user how many items were entered and the total amount
due i.e.
You have entered 14 products. Your total amount owed is $600.78
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。