Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In addition to your file containing the code for the above classes, * * you must also submit a file that contains unit tests for
In addition to your file containing the code for the above classes, you must also submit a file that contains unit tests for your classes. It must have at least five unit tests and use at least two different assert functions. This part like the rest must be your own work.
Gradescope will not test your main function or unit tests the TAs will take care of that but it will run tests on the rest of your code as usual.
Here's a very simple example of how your classes could be used:
stand LemonadeStandLemons R Us # Create a new LemonadeStand callled 'Lemons R Us
item MenuItemlemonade # Create lemonade as a menu item wholesale cost cents, selling price $
stand.addmenuitemitem # Add lemonade to the menu for 'Lemons R Us
item MenuItemnori # Create nori as a menu item wholesale cost cents, selling price cents
stand.addmenuitemitem # Add nori to the menu for 'Lemons R Us
item MenuItemcookie # Create cookie as a menu item wholesale cost cents, selling price $
stand.addmenuitemitem # Add cookie to the menu for 'Lemons R Us
# This dictionary records that on day zero, lemonades were sold, cookies were sold, and no nori was sold
daysales
'lemonade' :
'cookie' :
stand.entersalesfortodaydaysales # Record the sales for day zero
printflemonade profit standtotalprofitformenuitemlemonade # print the total profit for lemonade so far
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started