Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Assignment 1 Book Inventory Before attempting this project, be sure you have completed all the reading assignments, non-graded exercises, discussions, and assignments to date

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

Computer Science

Assignment 1

Book Inventory

Before attempting this project, be sure you have completed all 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 :
    1. 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.
    2. 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.
    3. 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.
    4. 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 more user-friendly, readable.

Capture execution:

You should capture and label screen captures associated with compiling your code and running a passing and failing test cases 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!

Assignment Deliverables:

Deliverables include a single 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 Submission Requirements document posted in Week 1): CMIS242ASG1[name].java, CMIS242ASG1[name].docx, or CMIS242ASG1[name].pdf.

Though you might construct the assignment with multiple classes, the final submission should be a single Java program. The process of combining multiple classes into a single Java program is found in Week 1 Content under the Practice Exercise thread and titled Practice Exercise as ONE Java program. Submit the combined Java program as the attachment for Assignment 1.

The word (or PDF) document should include a Test Plan with multiple test cases. Each test case should be referenced to a screen capture showing the successful compiling and running of each of the test case. 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: Note: Elements Included in the Grading of the Program document contains additional grading elements.

Criteria

Level 3 20 points

Level 2 15 points

Level 1 5 points

Criterion

Score

Criterion 1

Add

Correct or almost correct code to meet required functionality.

Mistakes in implementation

Missing or

significantly incorrect implementation

/ 20

Criterion 2

Remove

Correct or almost correct code to meet required functionality.

Mistakes in implementation

Missing or

significantly incorrect implementation

/ 20

Criterion 3 Find

Correct or almost correct code to meet required functionality

Mistakes in implementation

Missing or

significantly incorrect implementation

/ 20

Criterion 4 Display

Correct or almost correct code to meet required functionality.

Mistakes in implementation

Missing or

significantly incorrect implementation

/ 20

Criterion 5

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

/ 20

Total

 

 

 

/ 100

 

 

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE