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:
Quantity to start
.35 each, 3.85 per dozen
24 dozen
.45 each, 4.95 per dozen
24 dozen
5.75 per dozen
6 dozen
Chocolate Cookie
.75 each
12 dozen
Chocolate Cake
28.85 each
Lemon Cake
28.85 each
Deluxe Cherry Pie

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.

This project should have:
Analysis and UMLs by individuals
Collaborative analysis and UMLs
Collaborative design
A testing plan for each major unit with example inputs and expected outputs
Coding that clearly indicates who did what
Documentation of the testing done – notes as to what changed because it didn’t match the testing
Documentation of code thru extensive use of well-named variables and functions, as well as comments that explain what each function does, what inputs it takes, and what (if anything) it returns.
NO global variables.
Binary file output.
A Password class that validates and stores passwords, and throws an exception if the password is not valid.
Appropriate separation of code through header & cpp files
A CreditCard class that includes a function that validates a credit card using a checksum. Validation *should not* save the credit card number as a single value (string or integer) but should get and process the information one character at a time. If there is an error, an error should be thrown, and the user should be allowed to enter a new credit card number. (NOTE: this function should only have character and integer data types - no arrays, no strings, no vectors!)
A Money base class that stores the value, symbol, and name for each coin/bill, and a toString() method that converts any type money to a string with symbol, formatted amount, and the name of the currency. The subclasses should allow for overrides for addition and subtraction.
Currency subclasses for each type of money, and a demonstration of the subclassing. Each currency subclass must have convertToUSD() and convertFromUSD() functions as well as the symbol for the currency.
A print() function that prints the type of money input demonstrating polymorphism.
A toString() function that returns the input amount as a formatted string with the proper currency symbol.

Student Learning Outcomes
Development of UMLs for classes
Code separation into logical units (header files, class files)
Virtual functions and static functions
Abstract base classes
Dynamic arrays
Binary Files
Overloaded operators
Friend functions
Exception generation and catching
Algorithm design
Large program management
Unit testing
Testing of large programs
Inquiry into and analysis of complex problems
Independence and collaboration on complex, multiphase problems
Community engagement with exploration into food types and currencies.
You need to:
Have a function that displays all the items and their prices, prompts the user to enter their choice.
Use a sentinel value to “Cancel” the order.
The user can only purchase 1 type of item at a time, but may purchase more than one of that type (e.g. 2 donuts or 5 cookies).
In another function, prompt the user to enter the amount of money needed.
One or more functions to accept input and keep track of change.
Users can enter pennies, nickels, dimes, quarters, or bills. Your change must be the least number of bills and coins possible.
Let’s say something costs $1.50. Prompt the user to enter $1.50. The user can pay with a dollar and 2 quarters, or can pay with a $5 bill, or with 15 dimes, etc. The user cannot simply enter 1.50.
As long as the amount entered is less than the amount needed, the user should be prompted for the amount still needed.
So for $1.50, if the user first enters a quarter, then you should say something like: Please enter $1.25 cents.
If the user enters too much (i.e. they give you 1 quarter, 1 dime, and 2 dollar bills), then you will need to give them back a $0.85, possibly as 3 quarters and 1 dime. You must give the change in bills and coins, NOT as $.15 or 15.
You cannot return change if you do not have the correct change in the cash register!
if you only have one quarter in this example, you will have to return 1 quarter, and 6 dimes.
If you cannot make the proper change, will have to refund all the money and keep the purchase.
Randomly (but rarely) reject a 50 or 20-dollar bill if one is entered.
Ask the user if they would like to purchase another item (until they enter the sentinel value.)
Keep track of how many of each item has been sold.
If an item is sold out indicate that it is sold out in the menu.
At the end of a “day”, print a table of the items sold like this:

10 dozen and 8
12 dozen (sold out)
6 dozen (sold out)
Chocolate Cookie
8 dozen and 3
Chocolate Cake
Lemon Cake
Deluxe Cherry Pie

At the end of the program, total the amount of money collected from customers, how much total tax was paid, and how many of each type of bill, quarters, nickels, and dimes there are in the cash register. The breakdown should include:
Start amount in register
Total of credit-card reciepts
Collected amount (total)
Total Tax amount
Number of $50, $20, $10, $5, $1 bills, quarters, dimes, nickels, and pennies.
Amount of other currencies and their converted value
At the end of the program, write a binary file of the items sold, and the total (i.e. all of the above into a file.) The file should be named GroupNameBakery.dat (where GroupName is your group’s name). Each day’s sales should be appended to the file.
This is not a site where people do your homework for you. There are other sites for that. By looking required programming design, you're probably in an intermediate foundational programming class and SHOULD have some idea where to start. Perhaps draw a flowchart or come up with some pseudocode, and then we'll try our best to assist.
It is as fiji885 already mentioned, no one is going to do it all for you. But, maybe, and others hopefully agree, if you need help to get started on your part of the assignment, you would also likely receive help.

In order for that to happen, you will have to narrow it down. Since this is a group-project, which part has your group decided you are going to solve? And if you then have some code to show for, which parts would you need further help with?


What I consider a bonus is that it even has some social and one tasty component to it:

Inquiry into and analysis of complex problems
Independence and collaboration on complex, multiphase problems
Community engagement with exploration into food types and currencies.

Should be a fun and interesting project to solve. And not to difficult or complex either, all you need to know is already laid out for you in the instructions. :-)
Topic archived. No new replies allowed.