Version Information: Version: 3 Last Edited: June 05, 2022 Changelog: JM_AC_CET-CS Version Description 3 2 1...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Version Information: Version: 3 Last Edited: June 05, 2022 Changelog: JM_AC_CET-CS Version Description 3 2 1 Requirement to use ArrayList, Sorting Interfaces, Data Persistence. Your solution will include 4 food items since you created the 4th one in Assignment 1 Added methods that can be added to the classes and sample output Initial Version The Rules 1. You MUST use the default package in your assignment so that we can compile and run your program easily. 2. ALL data members MUST be declared as private (or protected in the Base class when necessary only). 3. Your program must be written using Object Oriented Principles (as outlined in the course notes and previous courses) and with efficiency in mind, you may lose marks for inefficient code. 4. Never leave compile warnings, address them without suppressing them! 5. A solution that does not compile will receive a grade of 0. Problem Description In this assignment, you will modify the solution to Assignment 1. You are to start with your solution to Assignment 1. You must also submit a test plan for the functionality created in this assignment. You must add to your test plan from assignment 1 to include testing the new functionality. All requirements must still behave the same as described in assignment 1 unless overwritten by the requirements here. Requirements 1. Friendly Input: Ensure that your solution accepts spaces in any string input. 2. Efficiency: You will update the inventory data structure in two ways: o Change the inventory declaration in the Inventory class to be an object of ArrayList. Change the insert into the data structure so that the FoodItem objects are in numerical order from smallest to largest by itemCode in the most efficient way possible. Once the inventory structure is sorted, modify your other methods to also make them as efficient as possible. (Note - do NOT use Generic Collection methods yet we will learn to do the coding ourselves first). Do NOT use the built-in binarysearch method - write your own custom-made binary search method. Hint: you can modify and reuse the binary search method you wrote in the earlier labs). You are allowed to use any built-in methods of the ArrayList collection. 3. Saving data: You will add two menu selections to your assignment: o The first will read the contents of a file and add them to the Inventory::inventory ArrayList. (i.e. read). And the second will save the current contents of the Inventory::inventory ArrayList to a file (i.e. write). o File format of both read and write is one line per piece of data, depending on what kind of resource the file is describing, various numbers of lines are required. Many types of FoodItems can be included in the same file. o Each resource will be in the following formats: Fruit Veget f item code item name item code item name Preserve P item code item name quantity of item quantity of item quantity of item item cost item cost item cost item price item price item price name of the orchard farm supplier size of the jar Upon read, if you find a duplicate item Code, you can abort reading in the file. Valid FoodItems before that one should remain in the inventory and an appropriate error message should be displayed. You don't know the name of the file so you cannot hard-code it in your program, you must prompt the user for the filename 4. Search: You will add the ability to view a FoodItem given the item Code. 5. Menu Update: The new menu should look exactly like this: Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 6. When '5' is chosen by the user, the program will ask the user to enter the item Code. See table for full details: Enter the code for the item: Code not found in inventory... When code doesn't exist When code is found, display Enter the code for the item: details of the item associated to that code 7. When '6' is chosen by the user, the program will ask the user to enter the filename to save to. See table for full details: Enter the filename to save to: 8. When '7' is chosen by the user, the program will ask the user to enter the filename to read from. See table for full details: Enter the filename to read from: 9. When '8' is chosen by the user, the message "Exiting..." is displayed and the program terminates. Item: 111 Granny Smith Apple 30 price: $0.25 cost: $0.10 orchard supplier: Apple Orchard 10. You can add the following methods to your classes to accomplish the above. If you need any other methods, they must be private helper methods. o Inventory: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void searchForItem (Scanner scanner) Added: public void saveToFile (Scanner scanner) Added: public void readFromFile (Scanner scanner) o FoodItem: I Updated: public boolean addItem (Scanner scanner, boolean fromFile) Updated: public boolean inputCode (Scanner scanner, boolean fromFile) Added: public int getItemCode () Added: public void outputItem (Formatter writer) o Fruit: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) Vegetable: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) o Preserve: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) 11. You must implement one of the comparison interfaces to compare FoodItems, either Comparator or Comparable. If you are implementing the Comparator interface, you will have a new class, if you are implementing Comparable, you will have a new method in one of your classes. You are permitted to use Collections.sort() but you have to pass to it the comparison object. 12. Remember, you must write EFFICIENT code. The changes above should allow you to improve the efficiency of some of the functionality from Assignment 1, that will be checked, ensure you take full advantage of the changes. Submission [Via Activities menu/Assignments option] You must submit to the assignment link in Brightspace by the due date and time. Your submission should follow the Submission Checklist All source code - i.e. java files with headers NOTE: we will re-compile and run your program.....so all code must be available to us and MUST NOT be in a package. Headers should contain name, student number, assignment number, date, purpose of class Javadoc: A description of each data member and method should be described using Javadoc notation Generate the Javadoc for your solution and upload a zip of the generated folder with a member visibility of Private Test plan In Eclipse, go to Project->Generate Javadoc, select your project and "Create Javadoc for members with Visibility: Private" then click Finish. o Can be in word or pdf format Should contain positive and negative testing (sometimes called happy path and unhappy path) You should indicate which tests your program passes and which one fails Text files: MyInventory2.txt and MyInventory.txt (be sure to include this text files with your submission) Failure to provide any of the above will have an effect on your grade for this assignment. The assignment rubric will be published with the assignment submission link by the end of the week. Marking Scheme Item Data Structure /Syntax and Logic: ArrayList used, Arraylist is used. Add items to inventory and display them Searching: Fully functional custom-built Binary Search method created File I/O, Data Persistence: Write operation: Save inventory to file File I/O, Data Persistence: Read operation: Read inventory from file Comparator or Comparable Sorting done using one of these interfaces of Sorting Function: Comparator class and compare method implemented OR Comparable's compareTo method implemented verify) (check code to Exception handling: Data validation checks implemented Test Plan: Updated, correctly designed and submitted on time Javadoc added in program codes, generated and submitted Assign2Test class Menu works + properly formatted output + code comments, correct names and submission procedures adhered to Total Marks 2 2 3 3 3 2 2 1.5 1.5 20 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 123 Code not found in 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) 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: 234 Enter the cost of the item: .10 Enter the sales price of the item: .25 Enter the name of the orchard supplier: Niagara 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) or a preserve (p)? v Enter the code for the item: 222 Enter the name for the item: Hot House Tomato Enter the quantity for the item: 500 Enter the cost of the item: .15 Enter the sales price of the item: .33 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) or a preserve (p)? p Enter the code for the item: 112 Enter the name for the item: Strawberry Jam Enter the quantity for the item: 35 Enter the cost of the item: 2.24 Enter the sales price of the item: 5 Enter the size of the jar in millilitres: 250 Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 6 Enter the filename to save to: MyInventory.txt Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: MyInventory.txt Item code already exists Error Encountered while reading the file, aborting... Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 333 Code not found in 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 112 Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: NoFile.txt File Not Found, ignoring... Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: MyInventory2.txt Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 100 Barlett Pear 100 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 212 Raspberry Jam 30 price: $5.50 cost: $2.28 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 farm supplier: McDonald's Farm Item: 311 McIntosh Apple 200 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 322 Vine Ripe Tomato 100 price: $0.35 cost: $0.10 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 100 Item: 100 Barlett Pear 100 price: $0.25 cost: $0.10 orchard supplier: Niagara 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 8 Exiting... Version Information: Version: 3 Last Edited: June 05, 2022 Changelog: JM_AC_CET-CS Version Description 3 2 1 Requirement to use ArrayList, Sorting Interfaces, Data Persistence. Your solution will include 4 food items since you created the 4th one in Assignment 1 Added methods that can be added to the classes and sample output Initial Version The Rules 1. You MUST use the default package in your assignment so that we can compile and run your program easily. 2. ALL data members MUST be declared as private (or protected in the Base class when necessary only). 3. Your program must be written using Object Oriented Principles (as outlined in the course notes and previous courses) and with efficiency in mind, you may lose marks for inefficient code. 4. Never leave compile warnings, address them without suppressing them! 5. A solution that does not compile will receive a grade of 0. Problem Description In this assignment, you will modify the solution to Assignment 1. You are to start with your solution to Assignment 1. You must also submit a test plan for the functionality created in this assignment. You must add to your test plan from assignment 1 to include testing the new functionality. All requirements must still behave the same as described in assignment 1 unless overwritten by the requirements here. Requirements 1. Friendly Input: Ensure that your solution accepts spaces in any string input. 2. Efficiency: You will update the inventory data structure in two ways: o Change the inventory declaration in the Inventory class to be an object of ArrayList. Change the insert into the data structure so that the FoodItem objects are in numerical order from smallest to largest by itemCode in the most efficient way possible. Once the inventory structure is sorted, modify your other methods to also make them as efficient as possible. (Note - do NOT use Generic Collection methods yet we will learn to do the coding ourselves first). Do NOT use the built-in binarysearch method - write your own custom-made binary search method. Hint: you can modify and reuse the binary search method you wrote in the earlier labs). You are allowed to use any built-in methods of the ArrayList collection. 3. Saving data: You will add two menu selections to your assignment: o The first will read the contents of a file and add them to the Inventory::inventory ArrayList. (i.e. read). And the second will save the current contents of the Inventory::inventory ArrayList to a file (i.e. write). o File format of both read and write is one line per piece of data, depending on what kind of resource the file is describing, various numbers of lines are required. Many types of FoodItems can be included in the same file. o Each resource will be in the following formats: Fruit Veget f item code item name item code item name Preserve P item code item name quantity of item quantity of item quantity of item item cost item cost item cost item price item price item price name of the orchard farm supplier size of the jar Upon read, if you find a duplicate item Code, you can abort reading in the file. Valid FoodItems before that one should remain in the inventory and an appropriate error message should be displayed. You don't know the name of the file so you cannot hard-code it in your program, you must prompt the user for the filename 4. Search: You will add the ability to view a FoodItem given the item Code. 5. Menu Update: The new menu should look exactly like this: Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 6. When '5' is chosen by the user, the program will ask the user to enter the item Code. See table for full details: Enter the code for the item: Code not found in inventory... When code doesn't exist When code is found, display Enter the code for the item: details of the item associated to that code 7. When '6' is chosen by the user, the program will ask the user to enter the filename to save to. See table for full details: Enter the filename to save to: 8. When '7' is chosen by the user, the program will ask the user to enter the filename to read from. See table for full details: Enter the filename to read from: 9. When '8' is chosen by the user, the message "Exiting..." is displayed and the program terminates. Item: 111 Granny Smith Apple 30 price: $0.25 cost: $0.10 orchard supplier: Apple Orchard 10. You can add the following methods to your classes to accomplish the above. If you need any other methods, they must be private helper methods. o Inventory: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void searchForItem (Scanner scanner) Added: public void saveToFile (Scanner scanner) Added: public void readFromFile (Scanner scanner) o FoodItem: I Updated: public boolean addItem (Scanner scanner, boolean fromFile) Updated: public boolean inputCode (Scanner scanner, boolean fromFile) Added: public int getItemCode () Added: public void outputItem (Formatter writer) o Fruit: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) Vegetable: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) o Preserve: Updated: public boolean addItem (Scanner scanner, boolean fromFile) Added: public void outputItem (Formatter writer) 11. You must implement one of the comparison interfaces to compare FoodItems, either Comparator or Comparable. If you are implementing the Comparator interface, you will have a new class, if you are implementing Comparable, you will have a new method in one of your classes. You are permitted to use Collections.sort() but you have to pass to it the comparison object. 12. Remember, you must write EFFICIENT code. The changes above should allow you to improve the efficiency of some of the functionality from Assignment 1, that will be checked, ensure you take full advantage of the changes. Submission [Via Activities menu/Assignments option] You must submit to the assignment link in Brightspace by the due date and time. Your submission should follow the Submission Checklist All source code - i.e. java files with headers NOTE: we will re-compile and run your program.....so all code must be available to us and MUST NOT be in a package. Headers should contain name, student number, assignment number, date, purpose of class Javadoc: A description of each data member and method should be described using Javadoc notation Generate the Javadoc for your solution and upload a zip of the generated folder with a member visibility of Private Test plan In Eclipse, go to Project->Generate Javadoc, select your project and "Create Javadoc for members with Visibility: Private" then click Finish. o Can be in word or pdf format Should contain positive and negative testing (sometimes called happy path and unhappy path) You should indicate which tests your program passes and which one fails Text files: MyInventory2.txt and MyInventory.txt (be sure to include this text files with your submission) Failure to provide any of the above will have an effect on your grade for this assignment. The assignment rubric will be published with the assignment submission link by the end of the week. Marking Scheme Item Data Structure /Syntax and Logic: ArrayList used, Arraylist is used. Add items to inventory and display them Searching: Fully functional custom-built Binary Search method created File I/O, Data Persistence: Write operation: Save inventory to file File I/O, Data Persistence: Read operation: Read inventory from file Comparator or Comparable Sorting done using one of these interfaces of Sorting Function: Comparator class and compare method implemented OR Comparable's compareTo method implemented verify) (check code to Exception handling: Data validation checks implemented Test Plan: Updated, correctly designed and submitted on time Javadoc added in program codes, generated and submitted Assign2Test class Menu works + properly formatted output + code comments, correct names and submission procedures adhered to Total Marks 2 2 3 3 3 2 2 1.5 1.5 20 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 123 Code not found in 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) 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: 234 Enter the cost of the item: .10 Enter the sales price of the item: .25 Enter the name of the orchard supplier: Niagara 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) or a preserve (p)? v Enter the code for the item: 222 Enter the name for the item: Hot House Tomato Enter the quantity for the item: 500 Enter the cost of the item: .15 Enter the sales price of the item: .33 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 1 Do you wish to add a fruit (f), vegetable (v) or a preserve (p)? p Enter the code for the item: 112 Enter the name for the item: Strawberry Jam Enter the quantity for the item: 35 Enter the cost of the item: 2.24 Enter the sales price of the item: 5 Enter the size of the jar in millilitres: 250 Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 6 Enter the filename to save to: MyInventory.txt Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: MyInventory.txt Item code already exists Error Encountered while reading the file, aborting... Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 333 Code not found in 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 112 Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: NoFile.txt File Not Found, ignoring... Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 7 Enter the filename to read from: MyInventory2.txt Please select one of the following: 1: Add Item to Inventory 2: Display Current Inventory 3: Buy Item(s) 4: Sell Item(s) 5: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 2 Inventory: Item: 100 Barlett Pear 100 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 111 Granny Smith Apple 234 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 112 Strawberry Jam 35 price: $5.00 cost: $2.24 size: 250mL Item: 212 Raspberry Jam 30 price: $5.50 cost: $2.28 size: 250mL Item: 222 Hot House Tomato 500 price: $0.33 cost: $0.15 farm supplier: McDonald's Farm Item: 311 McIntosh Apple 200 price: $0.25 cost: $0.10 orchard supplier: Niagara Orchard Item: 322 Vine Ripe Tomato 100 price: $0.35 cost: $0.10 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 5 Enter the code for the item: 100 Item: 100 Barlett Pear 100 price: $0.25 cost: $0.10 orchard supplier: Niagara 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: Search for Item 6: Save Inventory to File 7: Read Inventory from File 8: To Exit > 8 Exiting...
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Given in (a) & (b) are stress states of an element. Are these elements in equilibrium? If not, what are the body forces needed to make the current stress state an equilibrium stress state? (a) -x+y...
-
You are a trader who joined a large investment bank two years ago. Pat, one of your fellow traders, is well known on the Street for being a big risk taker and a big money maker for the firm....
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Discuss the interface between Purchasing and Supply Management and Logistics Management specifically with respect to selection of a third party logistics provider, analysis of the total cost of...
-
Express z1 = i, z2 = 1 - 3i, and z3 = 3 + i in polar form, and use your results to find z1z2/z3. Check your results by performing the calculations without using polar forms.
-
The weather in Charlotte, North Carolina, can be classified as sunny, cloudy, or rainy on a given day. Climate data from 2003 reveal that If a day is sunny, then the next day will be sunny with...
-
The P & A partnership does not prepare a distribution of net income statement or an owners' equity statement at the end of a fiscal period. Instead, the information is all reported in detail on the...
-
Lindstrom Corporation was organized in January 2012. The state authorized 200,000 shares of no-par common stock and 50,000 shares of 12%, $25 par, preferred stock. Record the following transactions...
-
Gallerani Corporation has received a request for a special order of 5,700 units of product A90 for $27.90 each. Product A90's unit product cost is $27.35, determined as follows: Direct materials...
-
1. Do you think the decision by CLT to build its own project managers from the existing employee base is a good one? What advice would you give to CLT to make sure that it has strong project...
-
Consider the following social network. and Calculate the node-betweenness of nodes A and C (Show work). E TI F C A B D
-
Lavage Rapide owns and operates a large automatic car wash facility near Montreal. The following table provides estimates concerning the company s costs: Fixed Cost per Month Cost per Car Washed...
-
Medical care and health insurance costs in the United States have been increasing for several years now. If there were no third parties active in medical care today, do you think the costs would be...
-
In its income statement for the year ended December 31, 2022, Marin Inc. reported the following condensed data. Operating expenses $ 609,000 Interest revenue $ 27,720 Cost of goods sold 1,055,040...
-
Max does not like his team lead, Ella. He finds her rude and believes that she is out to get him. After Ella insults him in front of the entire office for coming to work ten minutes late, Max decides...
-
Quality Brick Company produces bricks in two processing departments Molding and Firing. Information relating to the company s operations in March follows: Raw materials used in production: Molding...
-
1.What strategic approach is applicable for the following and why? A) Government Agencies B) Non Profit Organizations ( The strategic approaches are 1. Top- bottom approach, 2. Bottom-top approach,...
-
What are three disadvantages of using the direct write-off method?
-
In 2012, Gale and Cathy Alexander hosted an exchange student, Axel Muller, for 9 months. Axel was part of International Student Exchange Programs (a qualified organization). Axel attended tenth grade...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-4. Ivan and Irene paid the following in 2012 (all by check or can otherwise be...
-
A distillation column operating at total reflux is separating acetone and ethanol at \(1.0 \mathrm{~atm}\). The height of packing is \(2.0 \mathrm{~m}\). The column has a partial reboiler and a total...
-
We wish to strip \(\mathrm{SO}_{2}\) from water using pure air at \(20.0^{\circ} \mathrm{C}\). Outlet water contains \(0.0060 \mathrm{~mol} \% \mathrm{SO}_{2}\), and inlet water contains \(0.112...
-
If 1-in. metal Raschig rings are used instead of 2-in. rings in Example \(16-2\) : Example 16-2 Example 4-3 Example 16-1 a. Recalculate the flooding velocity and the required diameter. b. Recalculate...
Study smarter with the SolutionInn App