Answered step by step
Verified Expert Solution
Link Copied!

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 = LemonadeStand('Lemons R Us') # Create a new LemonadeStand callled 'Lemons R Us'
item1= MenuItem('lemonade',0.5,1.5) # Create lemonade as a menu item (wholesale cost 50 cents, selling price $1.50)
stand.add_menu_item(item1) # Add lemonade to the menu for 'Lemons R Us'
item2= MenuItem('nori',0.6,0.8) # Create nori as a menu item (wholesale cost 60 cents, selling price 80 cents)
stand.add_menu_item(item2) # Add nori to the menu for 'Lemons R Us'
item3= MenuItem('cookie',0.2,1) # Create cookie as a menu item (wholesale cost 20 cents, selling price $1.00)
stand.add_menu_item(item3) # Add cookie to the menu for 'Lemons R Us'
# This dictionary records that on day zero, 5 lemonades were sold, 2 cookies were sold, and no nori was sold
day_0_sales ={
'lemonade' : 5,
'cookie' : 2
}
stand.enter_sales_for_today(day_0_sales) # Record the sales for day zero
print(f"lemonade profit ={stand.total_profit_for_menu_item('lemonade')}") # print the total profit for lemonade so far
```

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago