Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

Java代写|Data Persistence Application Development Project

Java代写|Data Persistence Application Development Project



A vehicle rental company needs to implement an e-business system to manage vehicle rentals. The system is a typical 3-tier enterprise application that integrates a presentation tier, a business tier,and a persistence tier. The vehicle rental company has delegated this task to an IT service company.

After user requirements and budget analysis, the executive of the IT service company has decided to use Java EE open-source technology and related platforms for the implementation of the system. As an officer of the IT service company, you are assigned as the developer for the system core. To accomplish this task, you will divide the development work into two parts. In this assignment (assignment 2), you are to implement and test the persistence tier. In assignment 3, you are to design, implement and test the business tier and presentation tier. Consequently, a good implementation of this assignment is also important for assignment 3 as it will be integrated with the other 2 tiers of assignment 3.

The requirements of this assignment are as follows.

  1. The vehicle rental company manages two types of vehicles cars and trucks. A major assumption is that the two types of vehicles have some common attributes such as vehicle ID, vehicle make, vehicle description etc. To minimise code redundancy, you should use inheritance mapping. In your design, the vehicle-related Java classes should be at least 3 with 1 class as the superclass to abstract the common attributes and operations for the two types of vehicle and the other 2 classes are used to abstract other attributes and operations that are particular to a type of vehicle, such as the number of sites for a car or load capacity for a truck. You are required to use Java Persistence API (JPA) to persist the vehicle information into a Derby database. You are required to use the Joined-Subclass Strategy in your design of entities.
  1. The vehicle rental company needs to persist the details of a customer and his/her allocations, which is a list of vehicles that are rented to him/her (a customer can rent more than one vehicle). You are required to use entities to persist customer and their allocations.

The relationship between a customer and his/her allocations (rented vehicle) must be one-to-many i.e. a customer can rent multiple vehicles.

  1. When a vehicle is rented, it can’t be rented again. Hence the application must allocate an appropriate flag in the database for all vehicles to indicate whether they are rented or free.
  1. The vehicle rental company needs to retrieve and display the persisted information. You are required to use JPA to retrieve vehicle information, customer details and their allocations.

Particularly, you should use Java Persistence Query Language (JPQL) to query entities.

  1. You need to write 2 jEE applications (in 2 separate projects)
  2. Persistence project: when executed, the application will persist 3 cars and 3 trucks and 2 customers. Then persists 2 allocations for each customer. All of these entities are persisted in the Derby database using Query Language (JPQL). The data can be hardcoded as it only needs to run once (displays the persisted information using the entity on the screen when successful).

II.Retriever project: when executed, it displays an interactive command line menu that allows a user to retrieve the details of a particular vehicle, or a particular customer and customer vehicle allocations from the Derby database. The menu is displayed on 3 levels (there must be an option on every menu level to take the user back to the main menu). The application menu must have options to exit the application as well as display any errors or user-related messages regarding incorrect data entry etc. All user data entries must be checked for correct range and type to prevent runtime exceptions.

Retriever Project Suggested Menu Structure

Following is an example of what the Retriever project menu would look like:

Main Menu

Welcome to vehicle rental company data retrieval

Choose from the following options:

1- Search customer by name (take the user to a customer search screen)

2- Search vehicle by Id (take the user to a vehicle search screen)

3- Exit program

Customer Search

Enter ‘99’ – Return to the Main Menu

Enter customer name

<customer information and possible vehicle allocation are displayed>

<or user is returned to the main menu>

Vehicle Search

Enter ‘99’ – Return to the Main Menu

Enter Vehicle Id

<Vehicle information and its rental status is displayed>

<or user is returned to the main menu>

Submission instructions

To submit your assignment, you need to provide:

III. Two complete NetBeans projects (persistence project and retriever project) including Java source code and executable files. The project can be compiled and put into execution directly without any further revision/redevelopment or debugging.

IV.One end user test instructions including screenshots. You are required to provide detailed instructions about how a user will compile and run the software for persistence and retrieval. The test instruction must provide screenshots of your test in a Word document.

You must submit your assignment via the unit website. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted.

The marking criteria of this assignment are detailed in the following table.