Evaluate your ability to design programming logic

Assignment Help Other Subject
Reference no: EM133755820

Further Programming

Assignment - Introduction

You are required to implement a basic Java program using Java. This assignment is designed to:
Test your knowledge of basic Java concepts.
Evaluate your ability to design programming logic.
Practice simple object design in Java.

The Reading Room Book Shop
You are to implement a book purchasing system, called "The Reading Room". The system keeps a list of books that can be purchased (in physical and/or ebook form) as follows.

Each book has limited number of physical copies. You will track the number of available physical copies of each book. If the user tries to buy a (physical) book and there are no copies available, then the system outputs an error message.

Some (not all) books are available in ebook form. There is no limit of copies for ebooks. If the ebook exists for a book, then there is always a copy of the ebook available.

All physical books cost $50.00; all ebooks cost $8.00.

The user can request purchasing a book by specifying a keyword: the system lists all books that contain the keyword, along with the number of copies and ebook availability. The user chooses which form of the book they want: if the book is available then it gets added to the user's "shopping cart". Note that keyword matching is not case-sensitive here.

The user can view and update the shopping cart.

The user can print the full list of books and their availability.

Once the user is finished selecting books, the user can "checkout and pay"; the system prints the final total price and updates the number of copies of each book.


The user can quit the system (before or after paying).


Assumptions and Simplifications.
All prices as per Australian currency denominations.
Correct input can be assumed in this assignment. Error handling is not required.


Part A
Implement the above specifications without necessarily using object-oriented design at this stage. The key focus is to implement the correct algorithm logic. You can implement the system in one main program in a single class (Note: you may skip Part A and go straight to Part B with the use of OO. Part A is designed to let you focus on the basic functionalities.)

Following is a possible sample interaction with the bookstore system. You do not have to strictly follow the format but it illustrates required functionality. Text in bold and green is input from the user:

 

Welcome to The Reading Room!
===============================================
Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 1
Enter a keyword: Java concepts
Sorry! There are no books that match with your key word.

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 1
Enter a keyword: java
The following book(s) are found:
Absolute Java
JAVA: How to program
Computing Concepts with Java 8 Essentials
Java Software Solutions
Java Program Design
Cancel
Please select: 2
Do you want to buy this as an ebook: no
Sorry! There are no physical copies of the book!

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 1
Enter a keyword: Computing
The following books are found:
Computing Concepts with JAVA 8 Essentials
Cancel
Please select: 1
Do you want to buy this as an ebook: no
"Computing Concepts with JAVA 8 Essentials" has been added to your cart.

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 2

Your shopping cart contains the following book(s):
Computing Concepts with JAVA 8 Essentials

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 3

Your shopping cart contains the following book(s):
Computing Concepts with JAVA 8 Essentials
Cancel
What do you want to remove: 1
Item removed from shopping cart

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 1
Enter a keyword: Absolute
The following book(s) are found:
Absolute Java
Cancel
Please select: 1
Do you want to buy this as an ebook: no
"Absolute Java" has been added to your cart.


Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 4
You have purchased items to the total value of $50.00. Thanks for shopping with The Reading Room!


Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 5
The following books are available:
Absolute Java, 4 copies, ebook available
JAVA: How to Program, 0 copies, ebook available
Computing Concepts with JAVA 3 Essentials, 5 copies, no ebook
Java Software Solutions, 5 copies, no ebook
Java Program Design, 1 copy, ebook available


Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 6
Goodbye!

Part B

The aim of Part B is to incorporate basic object-oriented concepts into your program and test main functionality. In particular, define a Book class that contains all information related to a book title, including the title, author (this is new!), number of physical copies, and ebook availability. Using the OO solution, you should only use ONE data structure (e.g., a JCF data structure you prefer) of Book objects. This means you should not use different arrays to store book titles, book authors, etc. Note that within the whole program, you are permitted to use as many arrays as you prefer for other functionalities, e.g., another array for storing books in the shopping basket.
In Part B, the only change to the functionality is that when you print list of books, you list both title and author, as well as number of copies and ebook availability (see example output below).

NOTE1: it is OK to start using Object Oriented concepts from the start of the assignment if you prefer---
i.e. it is not a requirement to complete Part A before introducing OO.
=============================================== Welcome
to The Reading Room!
=============================================== Choose
an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 1
Enter a keyword: Java
The following book(s) are found:
Absolute Java| Savitch | 5 copies | yes
JAVA: How to program | Deitel and Deitel | 0 copies | yes
Computing Concepts with JAVA 8 Essentials | Horstman | 5 copies | no
Java Software Solutions | Lewis and Loftus | 5 copies | no
Java Program Design | Cohoon and Davidson | 1 copy | yes
Cancel
Please select: 2
Do you want to buy this as an ebook: no
Sorry! There are no physical copies of the book!

Choose an option:
Add a book to shopping cart
View shopping cart
Remove a book from shopping cart
Checkout
List all books
Quit
Please select: 5
The following books are available:
Absolute Java| Savitch | 5 copies | yes
JAVA: How to program | Deitel and Deitel | 0 copies | yes
Computing Concepts with JAVA 8 Essentials | Horstman | 5 copies | no
Java Software Solutions | Lewis and Loftus | 5 copies | no
Java Program Design | Cohoon and Davidson | 1 copy | yes

Reference no: EM133755820

Questions Cloud

How did you develop your classroom management plan : How did you develop your classroom management plan? How are rules and routines communicated to students and families?
Compare the environment and health issues identified : PUBH5783 Health in an Era of Environmental Change, The University of Western Australia - Provide an integrated summary of the key study findings/conclusions
What other elements of identity must be considered : When discussing issues of gendered experience and gendered discrimination, what other elements of identity must be considered? Why?
Formulate research questions to guide consultation project : Formulate five research questions to guide your consultation project and assist your client in overcoming these challenges.
Evaluate your ability to design programming logic : COSC2391 Further Programming, RMIT University Evaluate your ability to design programming logic. Practice simple object design in Java.
Female presents to your clinic for evaluation of hair loss : A 45 year old African American female presents to your clinic for the evaluation of hair loss
Which self-worth and self-efficacy impact a persons behavior : Give examples of ways in which self-worth and self-efficacy impact a person's behavior at home, at work, and at school.
Large violaceous nodules on bilateral arms : A 68-year-old female with AML leukemia presents with large violaceous nodules on bilateral arms.
Patients developed urinary tract infections : In January, Community Hospital had 57 discharges from its medicine unit. Four patients developed urinary tract infections while in the hospital.

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd