Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unittest file Here's a very simple example of how your classes could be used: ` ` ` stand = LemonadeStand ( ' Lemons R Us

Unittest file 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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago