Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
