-4

You are going to build a simulator for a Bakery Business. The bakery sells up to 10 different items, and has a different number of each item at the start of the day, randomly generated. Some items have two prices - a per-each price, and a per-dozen price. The bakery must open with at least 3 different items, but may have as many as 10. The bakery should include some items that are typical of the diversity of the neighborhood.

For example, your bakery may open one morning starting like this:
Item
Cost
Quantity to start
Donut
.35 each, 3.85 per dozen
24 dozen
Bagel
.45 each, 4.95 per dozen
24 dozen
Buñuelos
5.75 per dozen
6 dozen
Chocolate Cookie
.75 each
12 dozen
Chocolate Cake
28.85 each
5
Lemon Cake
28.85 each
5
Deluxe Cherry Pie
32.45
6

There is one cashier, and one cash register. The bakery can take cash and credit cards, but no credit card for any total less than $20. The bakery does not take any bill larger than a $50, but has discovered that $50, $20, and $10 bills are occasionally counterfeit. If a counterfeit bill is found, it is marked and returned to the person who paid with it (rejected). If a credit card is given, it must be properly validated using checksum information. If the credit card is rejected, the program should throw an error giving the checksum information as well as the number needed in the rightmost digit of the number.
The bakery is in a diverse neighborhood, with a large number of people who want to pay in money from other countries. The bakery owner has decided that they can take money from 5 other countries, Canada, Mexico, and 3 others of your choice. The bakery always gives change in USD, so must convert the amount paid to USD using exchange rates. The bakery rounds up to the nearest penny in favor of the bakery. When making change, the program should output the exchange rate for the currency.
The cash register starts with $140.77 as follows: 3 $20, 4 $10, 5 $5, 10 $1, 10 quarters, 20 dimes, 21 nickels, and 22 pennies. There is a tax on food at 4.05%. During the “day” (run of the program), multiple customers can purchase at the bakery. At the end of the “day” (run of the program), a binary “balance sheet” is updated with the important information for the bakery owner. At the end of the first day, a deposit is made to the bank of the “profit”.
There should be a password-protected administration program that:
Reads the “balance sheet” for the owner.
Passwords must have at least 7 characters, but no more than 15 characters: at least 1 lowercase, 1 uppercase, 1 digit, and one ‘special’ character. The special character cannot be a space, newline, or other non-printable character. The first time the program is run, the user must create their own login-credentials; these must be validated, then stored in a secure way for future use.
The balance sheet should be printed, with a sum of each type of item over the number of days as well as for each day.
This program should print the deposits each day from the start of the program. For example, if on day one, 4 dozen Buñuelos were sold at $5.75 per dozen, and on day three, 2 dozen Buñuelos were sold, then the daily report should show that, but the summary report should show 6 dozen Buñuelos sold.

Edited by happygeek: moved

Votes + Comments
Ah.. what the heck Let's dump my homework here and call it a day!
Doesn’t even know that you need a programming language to write a program
gtfo
5
Contributors
5
Replies
46
Views
3 Months
Discussion Span
Last Post by JamesCherrill
0

Tears for fears originally, then Adam Lambert in the best performance of any talent show anywhere anytime.
But yes, how appropriate for this thread

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.