Question: create a simple java application for a rug store. The store manages the rug information this is stored in Comma Separated Values (CSV) file (CSV
create a simple java application for a rug store. The store manages the rug information this is stored in Comma Separated Values (CSV) file (CSV files can be open using Excel OR text editor. This file is attached and must be used read & processed in your java application). This file has the following information for each rug (modelNumber, origin, price, dimensions, weight, and amountInStock). The business owner wants to automate the process when dealing with this file. So, the user should choose option (1) to print out all rugs' information. Option (2) adds rug to the rug file information (if the new rugs modelNumber is NOT exist in the .cvs file, then add it as brand new rug. Otherwise, if the new rugs modelNumber is in stock, increase the amountInStock by one). Option (3) is for creating an order. The user enters the modelNumber and the amount he needs. If it is in stock, decrease the amountInStock by one. If it is not in stock (amountInStock<=0), the system throws an exception but must report the error and continue to work normal. The check out process must create a folder called output and print a receipt to a text file. This receipt includes modelNumber, price, amount, and the total. Option (4) is to exit the application.
1- Consider each rug as an object.
2- Must implement techniques studied in this course (Store objects in collection, Encapsulation, Inheritance, and Polymorphism (overloading i.e. for adding a rug with some information is missing & overriding i.e. for print receipt)).
3- Must be resist to crash. That is, your java application MUST behave normally in all cases and must not exit the application without entering (4). For example, the application should not exit if the user enters string instead of integer, call object with unavailable modelNumber, insert a brand new rug with some information are missing etc.
4- Must implement techniques studied in this course (Store objects in collection, encapsulation, overloading i.e. for adding a rug with some information is missing)."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
