Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
The Assignment 2 Specification and Marking Criteria
Data Persistence Application Development Project
A real estate company needs to implement an e-business system to manage properties. The system is a typical 3-tier enterprise application that integrates a presentation tier, a business tier, and a persistence tier. The real estate 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 designer and developer for the system core. To accomplish this task, you will divide the design and development work into two parts. In this assignment (assignment 2), you are to design, 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 design and implementation of this assignment is also important for assignment 3 as it will be integrated with the other 2 tiers of assignment 3.
The specification of this assignment is as follows.
1. The real estate company manages two types of property: properties for sale and properties for rent. A major assumption is that the two types of property have some common attributes such as property ID, property address, property description etc. In order to minimise code redundancy, you should use inheritance mapping. In your design, the Java classes should be at least 3 with 1 class as the super class to abstract the common attributes and operations for the two types of property and the other 2 classes are used to abstract other attributes and operations that are particular to a type of property, such as weekly rent price for a rent property or sale price for a sale property. You are required to use Java Persistence API (JPA) to persist the property information into a Derby database. You are required to use the Joined-Subclass Strategy in your design of entities.
2. The real estate company needs to persist the contact details of a property manager and his/her allocations, which is a list of properties that is assigned to him/her for sale or rent management. You are required to use entities to persist property managers and their allocations. The relationship between a property manager and his/her allocations (managed properties) must be one-to-many unidirectional i.e. a property manager can manage multiple properties.
3. The real estate company needs to retrieve the persisted information. You are required to use JPA to retrieve property information, property manager details and his/her allocations. Particularly, you should use Java Persistence Query Language (JPQL) to query entities.
When presentation and business is not the focus of this assignment, you still need a simple user interface to test the success of the design and implementation of the persistence requirements as specified as the aforementioned 1 and 2.
The following screenshot shows that the execution of such a tester. In the screenshot, the tester persists 2 sale properties and 2 rent properties and 2 property managers. Then the tester persists 2
1
allocations for each property manager. All of these entities are persisted into the Derby database and be ready to be retrieved by Java Persistence Query Language (JPQL).
The following screenshot shows that the execution of the tester for the entity retrieval. In the screenshot, a user can retrieve the details of a particular property, a particular property manager and his/her allocations from the Derby database. Note the function 3 below in the screenshot is necessary to show the success of the one-to-many relationship between a property manager and his/her allocations.
2
To demonstrate success, you are to implement all the entities with the inheritance and relationship and Java standalone applications to fulfil the aforementioned requirements.
Submission
To submit your assignment, you need to provide:
1. A complete NetBeans project including Java source code and executable files. The project can be compiled and put into execution directly without any further revision/re- development or debugging.
2. An end user test instruction. You are required to provide detailed instructions about how a user will compile and run the software for the data persistence and retrieval. The test instruction must be documented in a Word document.
3
The complete project and the documents will need to be compressed into a zip file for submission. You must submit your assignment via the unit web site. 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.
Marking Criteria
Available Marks
Test Instruction
8
1. Whether the instruction has covered the compiling and execution of the application
2
2. Whether the instruction has covered data persistence test
3
3. Whether the instruction has covered data retrieval test
3
Software Implementation
17
1. Being compilable and runnable
2
2. Whether the entities have been correctly classified and implemented
3
3. Whether the inheritance between entities has been correctly implemented by joined subclass strategy
2
4. Whether the one-to-many relationship between entities has been correctly implemented
2
5. Whether JPQL named queries have been correctly declared
2
6. Whether the Java application effectively demonstrates the data persistence
2
7. Whether the Java application effectively demonstrates the data retrieval
2
8. Others: source code inline comments, layout and reliability
2
Late Penalty
-1.25 (5% each calendar day either full or part)
Plagiarism Related Penalty