Assignment 1 Book Inventory Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, discussions, and assignments to date. Design and implement...

1 answer below »
programming



Assignment 1 Book Inventory Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, discussions, and assignments to date. Design and implement Java program as follows: (1) There will be a Book Java class with following attributes: id, title, and price. (2) There will be an Inventory Java class which stores and manages a list of Book objects (3) Inventory class will provide the following functionality: a. Add: Prompts user for book data and add to the inventory list. If the book already exists (based on id value), the add request will fail and an error message will be printed to the console b. Remove. Prompts user for book id, finds the id in the inventory list and removes it. If the book matching the id is not in the inventory, remove request will fail and an error message will be printed to the console c. Find: Prompts user for book id, finds the id in the inventory list and print all the data for the book (id, title, and price). If the book matching the id is not in the inventory, find request will fail and an error message will be printed to the console d. Display: Print all the book information for each book to the console (4) Implement RunInventory class with main method that will provide the menu with selection for each above functionality. Style and Documentation: Make sure your Java program is using the recommended style such as:  Javadoc comment up front with your name as author, date, and brief purpose of the program  Comments for variables and blocks of code to describe major functionality  Meaningful variable names and prompts  Class names are written in upper CamelCase  Constants are written in All Capitals  Use proper spacing and empty lines to make code human readable Capture execution: You should capture and label screen captures associated with compiling your code, and running the a passing and failing scenario for each functionality Sample run 1: MENU 1: Add book 2: Remove book 3: Find book 4: Display all books 9: Exit program Enter your selection : 4 The inventory has no books MENU 1: Add book 2: Remove book 3: Find book 4: Display all books 9: Exit program Enter your selection : 9 Thank you for using the program. Goodbye! Sample run 2: MENU 1: Add book 2: Remove book 3: Find book 4: Display all books 9: Exit program Enter your selection : 1 What is the book id (integer value)? 12345 What is the book price (double value)? 19.98 What is the book title? The end of the civilization MENU 1: Add book 2: Remove book 3: Find book 4: Display all books 9: Exit program Enter your selection : 4 Book id= 12345 Book title=The end of the civilization Book price=19.98 MENU 1: Add book 2: Remove book 3: Find book 4: Display all books 9: Exit program Enter your selection : 9 Thank you for using the program. Goodbye! Submission requirements Deliverables include Java program (.java) and a single Word (or PDF) document. The Java and Word/PDF files should be named appropriately for the assignment (as indicated in the SubmissionRequirements document. The word (or PDF) document should include screen captures showing the successful compiling and running of each of the test scenario. Each screen capture should be properly labeled clearly indicated what the screen capture represents. Submit your files to Assignment 1 submission area no later than the due date listed in your online classroom. Grading Rubric: The following grading rubric will be used to determine your grade: Attribute Level (15-20 points) Level (5-15 points) Level 0 (0 - 5 points) Add Correct or almost correct code to meet required functionality Mistakes in implementation Missing or significantly incorrect implementation Remove Correct or almost correct code to meet required functionality Mistakes in implementation Missing or significantly incorrect implementation Find Correct or almost correct code to meet required functionality Mistakes in implementation Missing or significantly incorrect implementation Display Correct or almost correct code to meet required functionality Mistakes in implementation Missing or significantly incorrect implementation Menu, program documentation and style, screen captures Correct or almost correct menu, program comments, identifiers, and screen captures Mistakes or incomplete menu, documentation and/or style, and screen captures Missing or significantly incorrect menu, documentation and/or style, or screen captures
Answered 1 days AfterMar 26, 2021

Answer To: Assignment 1 Book Inventory Before attempting this project, be sure you have completed all of the...

Aditya answered on Mar 28 2021
148 Votes
/**
*
*/
/**
* @author
*
*/
public class Book {
    // data members
    private int id;
    
private String title;
    private double price;
    
    // default constructor
    
    // parameterized constructor
    public Book(int id, String title, double price) {
        this.id = id;
        this.title =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here