Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
Question:Language is JAVA! Due on Dec 9th. This project is based on lasthw project which I also pasted below.
Question:Language is JAVA!!!
Due on Dec 9th.
I need help on implementation of term project.
This project is based on lasthw project which I also pasted below.
Please don't send anything that is found online!!!
Term Project
This project will continue expanding on the Store that we have worked on in earlier assignments, but this time our focus is on developing a complete system that serves multiple roles. Important goals include, but are not limited to: Implementing classes based on externally provided interfaces Code re-factoring to promote re-use and separation of concerns Object-Oriented Analysis and Design Basic security and State Persistence This is a comprehensive project. Please read this document very carefully and be sure to resolve any doubts or concerns early on. Functionality: This time the main menu should look like: **Welcome to the Comets Books and DVDs Store** Please select your role: A - store manager B - customer C - exit store ****************************************************************************** If Option A is entered, the program will then prompt the user to enter credentials, like shown below: Please enter your username: xxxxx Please enter your password: yyyyy Valid credentials are stored in a credentials file, which will be a plain text file called credentials.txt. The file will have the following format: , // username and password are separated by a comma You can assume this file will be placed in the same directory as your source code when it is being graded. Thus, when testing locally, that is where you should place your version. Your program should look up in the given credentials file for the correct username and password; if no match is found in the file, the program should provide a response to the User such as "Unrecognized Credentials" and present the main menu again. You cannot assume that the file will only have one set of credentials, i.e., there may me multiple store managers. In this case, each set of credentials will appear on a new line in the file. If the authentication is successful, the program should display the catalog section as developed in assignment 3, with one addition - option 7 in the menu as shown below. **Welcome to the Comets Books and DVDs Store (Catalog Section)** Choose from the following options: 1 - Add Book 2 - Add AudioBook 3 - Add DVD 4 - Remove Book 5 - Remove DVD 6 - Display Catalog 7 - Create backup file 9 - Exit Catalog section If option 7 is entered, your program will save all current catalog items and their attributes into a text file, named as "catalog_backup_.txt" where the current date and time is the time the backup file being created (the file should be created in the current directory, i.e., the directory where your source is being run from). For example, if option 7 is entered at 2017-11-15-19:45:32 then the backup file should be named as "catalog_backup_2017_11_15_19_45_32.txt". You can use the Date class and SimpleDateFormat Class in Java to get the formatted date and time. (https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true) (https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) If Option 9 is selected, the program will return to the main menu for role selection. In addition to the original requirements from Assignment 3, each Item also has a private discount of type double - the corresponding getter and constructor methods need to be updated accordingly. Use 0.9, 0.5, and 0.8 as the discount values for Book, AudioBook, and DVD. ****************************************************************************** If Option B is selected, the program should display the menu for shopping section (assignment 2). In this project, the shopping cart should be implemented using list, instead of array in assignment 2. In addition, the menu should look like follow: Choose from the following options: 1 - Browse books inventory (price low to high) 2 - Browse DVDs inventory (price low to high) 3 - Add a book to the cart 4 - Add a DVD to the cart 5 - Delete a book from cart 6 - Delete a DVD from cart 7 - View cart 8 - Checkout 9 - Done Shopping Continue this looping until option 9 is selected. When option 9 is entered, return to the main role selection menu. If Option 1 or 2 is entered, list the book / dvd inventory in the order of price low to high as assignment 2, however the price should be the discounted price (see the discounts above). Discounted prices also apply to when viewing the cart and checking out (i.e., options 7 and 8). The behavior for the other options stay the same. ****************************************************************************** If Option C is selected, the program gracefully terminates. Design Considerations: (Data/Input) Validation has been a continual aspect of all our assignments. Often the validation code has been duplicated. This time we have a requirement to try and stay as DRY as possible. Thus, you will need to create a class called Validator which implements an interface as follows: o The interface is called Acceptable - you must crate this interface and include it as part of your code. The interface will have the methods: boolean isNonEmptyString (String s); boolean isPositiveInput (double d); o Your Validator class will implement this interface and define the methods to perform these checks. You are free to add more methods as appropriate. o Your code will use your validator to do all the input validation such that the appropriate methods can simply be called and all the duplicated code will reside in the Validator class. We will be sorting Items based on price for this assignment, but that does not mean we should be directly comparing the prices of two items. Instead our Items will implement the Comparable interface such that we can compare objects directly to see which one is larger/smaller. The logic to decide which one is larger or smaller will be in the compareTo method. All the code to handle File Input/Output should also be in its own class, exposing methods as appropriate, such that the calling code need just invoke the right methods, passing in the necessary arguments. Submission/Deliverables: Submit only your source code .java file(s) through eLearning. You must submit a pdf document along with your source that has class diagrams for each of your classes as well as any interfaces. This is worth 5% of the project grade. ** Exercise judgment appropriately - at this point you should be able to understand the context of this project and know what to validate and when - for example, there is no meaning to having some price of an Item as negative or zero. That is exactly what one of the validation methods is supposed to help with. ** Use any data structures we have discussed in class, or even those that you know of (but we haven't discussed in class) as appropriate. But all code must be your own or readily available in the Java SDK. No external libraries may be used and the expectation remains the same - when grading, we should just be able to download your code and compile it via command line. If you use an IDE that creates packages for you, but that allows local compilation for you, but does not compile via command line when downloaded during grading, then that will result in a zero.
Lasthw Project
Description and Code:
Description:
Develop an online store which sells dvds and books execpt this time,