Implement meaningful unit tests to test the functionalities

Assignment Help JAVA Programming
Reference no: EM133774055

Further Programming

Assignment

Introduction

This assignment is designed to:
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):

BOOKTITLE

AUTHORS

#PHYSICAL

COPIES

PRICE

(AUD)

# SOLD

COPIES

 

Absolute Java

 

Savitch

 

10

 

50

 

142

 

JAVA: How to Program

 

Deitel and Deitel

 

100

 

70

 

475

 

Computing Concepts with JAVA 8 Essentials

 

Horstman

 

500

 

89

 

60

 

Java Software Solutions

 

Lewisand Loftus

 

500

 

99

 

12

 

Java Program Design

 

Cohoon and Davidson

 

2

 

29

 

86

 

Clean Code

 

Robert Martin

 

100

 

45

 

300

 

Gray Hat C#

 

Brandon Perry

 

300

 

68

 

178

 

Python Basics

 

David Amos

 

1000

 

49

 

79

 

Bayesian Statistics The Fun Way

 

Will Kurt

 

600

 

42

 

155


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:

Username Password First name Last name
admin reading_admin Admin Admin
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.

Setup

You will use GitHub to store program code in this assignment. To get started, accept the assignment invitation. You will need to create a GitHub account if don't have. After accepting this invitation, create a git repository in FurtherJavaProgramming-classroom-2450. Make your repository private. Otherwise, your repository will be considered as plagiarism.

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.

Reference no: EM133774055

Questions Cloud

Develop a list of quality standards or requirements : Assessment - Project Report and Presentation - Develop a list of quality standards or requirements related to meeting the stakeholder expectations, focusing
How do gender-race coincide to create a social experience : How do gender and race coincide to create a social experience? Consider multiple races and intersectionality in your responses.
Who oppose adapting to the culture of the new firm : A variation of is to terminate managers from the acquired organization who oppose adapting to the culture of the new firm.
How were the drug claims broadcasted : How the government used the media and the media used the government to create a social drug epidemic. How were the drug claims broadcasted?
Implement meaningful unit tests to test the functionalities : How to extend your program to either achieve a certain new functionality or change the behaviour of an existing functionality.
Resolve escalated complaints with customers : Resolve Escalated Complaints with Customers To successfully complete Activity. Recognise early signs of conflict or disagreement in each simulated scenario.
New software system to streamline operations : our agency has asked you to lead a major project to acquire a new software system to streamline operations.
Programs funded by governments-nonprofit organizations : Programs funded by governments, nonprofit organizations, and most private foundations require
Read helping ex-prisoners keep out of prison : Read "Helping Ex-Prisoners Keep Out of Prison: What Works". What challenges do people face when re-entering society after a prison sentence?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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