Reference no: EM133777469
Advanced Programming
Evaluate your ability to develop GUI applications using JavaFX.
Evaluate your skills in storing persistent copy of data.
Test your knowledge to implement advanced OO design patterns.
Background
This assignment extends Assignment 1. You will build a GUI application for The Reading Room bookstore. The bookstore sells the following books (all are physical copies):
Task Specifications
Basic functional requirements are listed below.
The application can have many users.
Each user can create a profile, with a unique username, password, and first and last name.
Once the username and password are created, the user can log in.
Each user is shown a dashboard after login. The dashboard should display a personalized welcoming message that addresses the user by name. The dashboard also displays the top 5 popular books in the bookstore. The top 5 books are identified based on the number of sold copies.
Each user can perform the following actions:
Edit profile (change first name/last name/password, username is not changeable)
Add books to shopping cart. The program can guide the user to place an order by selecting books and specifying quantity. The program should allow the user to update the shopping cart (e.g., removing books, updating quantity) before checking out. When there is a modification to the shopping cart, the program should verify the availability of stock and notify the user if any selected book is unavailable.
Example 1. Assume that there are 10 copies of "Absolute Java" available. A user will get a warning message if he/she adds 11 copies of "Absolute Java" to shopping cart.
Example 2. Assume that there are 10 copies of "Absolute Java" available. User A adds 10 copies of "Absolute Java" to the shopping cart. User B also adds 2 copies of "Absolute Java" to the shopping cart. Both of them will NOT get a warning as long as they have not checked out.
Example 3. Assume that there are 10 copies of "Absolute Java" available.
User A adds 10 copies of "Absolute Java" to the shopping cart. User B also adds 2 copies of "Absolute Java" to the shopping cart. User B will get a warning message once user A checks out - the book "Absolute Java" is deemed as sold-out after user A checks out.
Check out. A user will be notified of the total price before placing the order. Once confirmed by the user, proceed to payment, where you collect (fake) credit card information (card number, expiry date, and cvv). (Do not use real credit card numbers!) You will need to perform simple validation to check (1) if the card number has 16 digits; (2) if the expiry date is a future date; (3) if cvv has 3 digits. For simplicity, you can assume the payment will be successful. Once an order is placed, a unique order number will be generated and assigned.
View all orders. The user can view the following details of all historical orders: order numbers, date and time the order was placed, the total price of each order, and books purchased along with their respective quantities. The orders should be displayed in reverse chronological order, with the most recent order appearing first.
Export all orders. The user should be able to export historical orders, including the date & time of the orders, total price, and the purchased books with their quantities, to a file. The user can select specific orders for export, choose the file destination, and specify the file name. The exported file should be saved in CSV format.
Log out.
The program has a special user that is the admin account. The account is initialized with the following information:
The admin user can perform the following actions:
Once log in, the admin user should be displayed with an admin dashboard, showing a welcome message to the admin user.
View the stock of all books. The program can list all the books in the bookstore. It will display the detailed information of each book, including the title, authors, price, the number of sold copies, and the remaining stock.
Update the stock of a book. The admin user can update (increase or decrease) the number of copies available for a selected book.
A non-admin user should not be permitted to perform the functionalities of an admin user, and vice versa. For example, a normal user should not be able to update the stock of books.
Assessment Details
This assignment is structured in three milestones: in-lab milestone check in week 10, full program submission in week 12, and post-submission interview in week 14. It is recommended for you to follow the stages below to incrementally build the GUI application. But you can also plan the work in your own way.
Instructions to create a git repository and upload your project to GitHub can be found in Work with GitHub and GitHub Classroom.pdf from Canvas -> Assignment 2. Throughout the program development, you will need to make regular commitments to GitHub to facilitate transparency in the development process.
Part A (In-Lab milestone - Week 10)
This milestone aims to assess your ability to define user interfaces for GUI application. For this milestone, you will prepare a documentation of your UI design using Scene Builder. While you don't need to strictly follow this design as you progress to later stages, you should propose a UI design that reflects your current understanding to the best of your ability at this stage.
Part B
Following Part A, you will work on the frontend and backend part of the application. You will implement the functionalities described in the task specification.
You will connect the front-end and back-end to build a functional program. You will use JDBC to store program data, so that the application can be restarted in the same state it was in the end of the previous execution. You will incorporate OO principles to design and optimize classes. You will also implement OO design pattern where applicable.
Part C (Full program submission - Week 12)
You will implement meaningful unit tests to test the functionalities of key classes in your program. See marking rubric for details.
Part D (Post-submission interview - Week 14)
You will be interviewed after program submission. During the interview, you will demonstrate the functionality and GUI design of your program. In addition, it is crucial for you to demonstrate your programming skills by clearly explaining how you design the program and implement different functionalities.
General Requirements
This section summarizes the general requirements of Assignment 2 in four aspects: (1) GUI; (2) Functionality; (3) Program Design; (4) Programming Challenge; and (5) Others. Please refer to Canvas -> Assignment 2 -> Rubric for detailed mark allocation.
Important notes: Marks for GUI, Functionality, and Programming Challenge are checked during the post-submission interview. If you do not attend the final interview, you will be awarded ZERO mark for these sections. You will also get mark deductions if you cannot EXPLAIN how you implement the functionalities.
GUI
Your program should include appropriate JavaFX components to make the application easy- to-navigate. For example, each window should have a window title; menu options (if applicable) are selected from a menu bar.
Your program should respond clearly to every user's action. For example, if the user types a wrong password, the login window should display a clear error message and ask the user to type again.
Your program should provide visual consistency. Avoid using different styles and labels for similar elements on different windows of the application.
The UI design of your program should serve the purpose of the application.
Functionality
All functions required by specification are implemented correctly covering different cases that might happen during the usage of the program.
Program Design
Appropriate choice of data structures that serves the purpose of the application. Class designs that adhere to the SOLID principles.
You are required to follow MVC pattern to connect the frontend with the backend.
You are required to use one of design patterns such as Singleton pattern, besides the MVC pattern.
You are required to implement at least one interface or abstract class to demonstrate your understanding of OO principles.
You are required to apply SOLID principles when appropriate in order to enhance the maintainability and extensibility of your program, decrease coupling amongst classes, and minimize code repetition across classes.
You are required to choose appropriate data structures to enhance the running efficiency of the program.
Programming Challenge
You will be asked two questions about how to extend your program to either achieve a certain new functionality or change the behaviour of an existing functionality. An example question is as follows:
Suppose the book "Clean Code" has become very popular recently and you need to set a limit on the maximum number of copies that can be purchased by each customer. How will you implement it?
To achieve the functionality described in the question, you should clearly identify which parts of your program, both frontend and backend, require modification. Additionally, you should explain how each component will be updated and how these changes will implement the desired functionality.
Others
High source code quality with adequately commented and properly indented codes and appropriate class/method/variable names.
Regular commitments to GitHub to show the progress of program development.
Implement at least 5 meaningful unit tests for one class that you choose.
Assignment - GUI Application
1. Overview of Assessment
In this assignment, you are required to work individually to develop a GUI Application, named TheReadingRoom, which allows users to buy books at The Reading Room book shop. Building on your work in Assignment 1, you will practice your knowledge of object-oriented design principles, design patterns, Java Collections Framework, graphical user interfaces, You will use Java and Java FX,
Assessment Tasks
The full assignment description can be found here:
As part of Assignment you are expected to push you code to a Github repository regularly (at least after evey significant code update). Your repository must be created within the designated GitHub classroom for this course (see the full assignment description).
Basic introductions to set up your assignment repository is provided here: Work with GitHub and GitHub Classroom.pdf
More basic introductions about Github are provided below. or you're welcome to ask your prat tutor for he[p with this task:
- Folhow this Hap World exercise to get started with GitHub
- Github Tutorial: Beginner's Guide
Make your repository "private" so not everyone can access your code but please do share it with the teaching staff. Use just the simplest features, don't worry about branching or forking, just create a basic repository and update files as you make changes to them.
Submission
Submit a zip file containing ALL your source codes in its package hierarchy. We will review your code, and mark the program structure and code quality.