Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sample Output: green is user input Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4:
Sample Output: green is user input
Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 2 Inventory: Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 3 Error...could not buy item Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 4 Error...could not sell item Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 1 Do you wish to add a fruit(f), vegetable(v),sweetener(s) or a preserve(p)? w Invalid entry Do you wish to add a fruit(f), vegetable(v),sweetener(s) or a preserve(p)? 1 Invalid entry Do you wish to add a fruit(f), vegetable(v),sweetener(s) or a preserve(p)? f Enter the code for the item: 111 Enter the name for the item: Granny Smith Apple Enter the quantity for the item: 30 Enter the cost of the item: .10 Enter the sales price of the item: .25 Enter the name of the orchard supplier: Apple Orchard Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 1 Do you wish to add a fruit(f), vegetable(v), sweetener(s) or a preserve(p)? s Enter the code for the item: 555 Enter the name for the item: Brown Honey Enter the quantity for the item: 40 Enter the cost of the item: .40 Enter the sales price of the item: 0.80 Enter the name of the farm supplier: James Farm Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 30 price: $0.25 cost: $0.10 orchard supplier: Apple Orchard Item: 555 Brown Honey Sweetener 40 price: $0.80 cost: $0.40 Sweetener supplier: James Farm Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 1 Do you wish to add a fruit(f), vegetable(v), sweetener(s) or a preserve(p)? v Enter the code for the item: 222 Enter the name for the item: Orange Carrot Enter the quantity for the item: 100 Enter the cost of the item: .25 Enter the sales price of the item: 1.00 Enter the name of the farm supplier: McDonald's Farm Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 1 Do you wish to add a fruit(f), vegetable(v), sweetener(s) or a preserve(p)? p Enter the code for the item: 333 Enter the name for the item: Raspberry Jam Enter the quantity for the item: 10 Enter the cost of the item: 4.50 Enter the sales price of the item: 5.50 Enter the size of the jar in millilitres: 500 Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 1 Do you wish to add a fruit(f), vegetable(v),sweetener(s) or a preserve(p)? f Enter the code for the item: ee Invalid code Enter the code for the item: -123 Enter the name for the item: Test Enter the quantity for the item: ee Invalid entry Enter the quantity for the item: -19 Invalid entry Enter the quantity for the item: 20 Enter the cost of the item: -3 Invalid entry Enter the cost of the item: h Invalid entry Enter the cost of the item: 3.4 Enter the sales price of the item: -9 Invalid entry Enter the sales price of the item: e Invalid entry Enter the sales price of the item: ! Invalid entry Enter the sales price of the item: 3.50 Enter the name of the orchard supplier: Test Orchard Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 30 price: $0.25 cost: $0.10 orchard supplier: Apple Orchard Item: 222 Orange Carrot 100 price: $1.00 cost: $0.25 farm supplier: McDonald's Farm Item: 333 Raspberry Jam 10 price: $5.50 cost: $4.50 size: 500mL Item: -123 Test 20 price: $3.50 cost: $3.40 orchard supplier: Test Orchard Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 3 Enter the code for the item: 444 Error...could not buy item Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 3 Enter the code for the item: 111 Enter valid quantity to buy: 20 Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 4 Enter the code for the item: 333 Enter valid quantity to sell: 15 Error...could not sell item Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 4 Enter the code for the item: 333 Enter valid quantity to sell: 9 Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 50 price: $0.25 cost: $0.10 orchard supplier: Apple Orchard Item: 222 Orange Carrot 100 price: $1.00 cost: $0.25 farm supplier: McDonald's Farm Item: 333 Raspberry Jam 1 price: $5.50 cost: $4.50 size: 500mL Item: -123 Test 20 price: $3.50 cost: $3.40 orchard supplier: Test Orchard Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: To Exit > 5 Exiting...
this is the sample output of already submitting question I did but I failed so I need help I really appreciate it.
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