You are on page 1of 2

CALIFORNIA STATE POLYTECHNIC UNIVERSITY

Department of Computer Science

CS 240
N.D.
Homework 4

Before you Begin:


Now that you have created a few data structures and sorting algorithms and saved them to
your github account it is time we start using them in more practical applications.
NOTE: You can only use classes you defined for CS 240 from your github library!

In-N-Out
Lynsi Torres the owner of In-N-Out is looking for a new Inventory system to be used at
her In-N-Out restaurants. She incentivizes a plan that allows all contestants to build a
system and each one will be tested at a given location for one month(December 2017).
Unfortunately, she is always late and she has given you a deadline of only five days.
Luckily you have prepared well for these last minute scenarios.

Things to Note:
Menu - (All Menu Items are saved as LISTS)
(1) Burger Bun, Patty, Lettuce, Tomato, Onion
(2) Cheese Burger Cheese, Bun, Patty, Lettuce, Tomato, Onion
(3) Vegan lettuce wrap Burger (NO Bun, No Patty),2 order of Lettuce, Tomato, Onion
(4) Burger No Onion - (No Onion), Bun, Patty, Lettuce, Tomato,
(5) Cheese Burger No Onion (No Onion), Cheese, Bun, Patty, Lettuce, Tomato
(6) Burger No Tomato - (No Tomato), Bun, Patty, Lettuce, Onion

Food (All Food items are saved in Separate Stacks.)


Food items will contain expiration date.
Push items in appropriate stack in the order they arrive.
Pop items off stack as customers order

HINT: To help simplify dates save dates as integer values.


Assume March 17 is saved as 317

Food Item and Expiration Date from deliver:


Bun(5 day), Patty(4 day), Lettuce(3 day), Tomato(3 day), Onion(5 day), Cheese(2 day)

Customers:(All Customers wait in a Queue to order)


Customers wait in a queue and randomly order menu items 1-6
SYSTEM:
1)Inventory
You will build a system to keep track of all of the food, in addition to orders placed and
items and customer lost.
(a) Customers will randomly order from the list 1-6
(b) When an order is placed you should decrement the particular items used to build a
burger.
(c) Shipments will arrive every 3-6 days(randomly chosen) and will contain a random
shipment(various items) between 700-1000 items.

As resupply ships come in you must push all items in there appropriate locations. At the
end of the day you will reorder the food stacks and throw away food that has expired

3) Lynsi Torres TEST


Restaurant opens at 10:00A.M. and closes at 8:00P.M. (people arrive 10-7)
(10AM, 11AM, 12PM, 1PM, 2PM, 3PM, 4PM, 5PM,6PM, 7PM)
Customers arrive on the hour between 1-100 people
The line can hold up to 50 people. (Queue = 50)
If more than 50 people arrive extra customers leave.
Save how many customers leave for the day. Int lostCustomerDay
If Customer successfully orders increment a counter of item customer
ordered. Example customer orders item 1 increment countItemOne
If Customer orders and items are not available customer leaves(no order)
Increment lostCustomerDay
Shipment arrive 9:00AM every 3-6 days. Randomly add 700-1000 per item
Use expiration dates above in Things to Note.
End of every day 9:00P.M. Sort food items by expiration day. (pick any sort)
Place items about to expire on top of stack. If item expires remove item.
Increment lost item.
Example if I throw away a tomato I will increment wasteTomtato

OUTPUT:
Run your program for the duration of December 2017.

For each Day Print the following:


1) lostCustomerDay
2) wasteCheese, wasteBun, wastePatty, wasteLettuce, wasteTomato, wasteOnion
3) countItemOne, countItemTwo, countItemThree, countItemFour, countItemFive,
countItemSix
4) Dictionary of customer and item ordered example (customer 1-> #3)
What to Submit:
Create a word document with your Name and GITHUB link. Additionally you
should include the output above and the code for your Inventory system
and test

You might also like