Further Programming COSC2391

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.
iuww520iuww520iuww520iuww520iuww520iuww520iuww520iuww520
This is an individual assignment. Your final submission is worth 15%; a simple demo in Week 4 is worth a  further 3%, giving a total of 18% for Assignment 1.
Academic Integrity (more)
The submitted assignment must be your own work . No marks will be awarded for any work which is not created by you.
Plagiarism is treated very seriously at RMIT. Plagiarism includes copying code directly from other students (or enables such copying) , the internet, the output of AI systems, or other resources without proper reference. Sometimes, students’ study and work on assignments together and submit similar files which may be regarded as plagiarism. Please note that you should always create your own assignment even if you have very similar ideas. Plagiarism-detection tools will be used to check all submissions.
Penalties may be applied in cases of plagiarism.
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).
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:
1. Add a book to shopping cart
2. View shopping cart
3. Remove a book from shopping cart
4. Checkout
5. List all books
6. Quit
Please select: 1
Enter a keyword: Java concepts
Sorry! There are no books that match with your key word.
  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值