Assignment title: Java
A sell company needs to build an e-business system. The system is a typical 3 - tier enterprise application that integrates a presentation tier, a business tier, and a persistence tier. The executive of IT Department has decided to use Java EE open source technology and related platforms and tools to implement the system. As an officer of the department, you are designated as the designer and developer of the system core. To accomplish this task, you will divide the design and development work into two parts. In this assignment (assignment- 1), you will design, implement, and test the persistence tier. In assignment-2, you will design, implement, and test the business tier and presentation tier. Consequently, a good design and implementation of this assignment is also important for assignment-2 as it will be integrated with the other 2 tiers of assignment-2. The specification of this assignment is as follows. 1. The company sells multiple products. You are free to choose any products that you like to use in your implementation. For example you can choose any of the following products: a. Desktops, laptops, …, or b. Shoes, suits, …, or c. Cars, motorcycles, …, or d. TVs, Hi-fi systems, …, or e. Jewelleries, watches, …, or f. Games, consoles, … A major assumption is that these products share some common properties (e.g. product ID, product title,...). In order to reduce code redundancy, you should use inheritance mapping. That is, in your design, the types of product are at least 2 and the Java classes should be at least 3 with 1 class as the super class to abstract the common properties and/or operations for the 2 types of product. 2. The product information must be persisted into a Derby database. You are required to use Java Persistence API (JPA 2 or higher) to persist the product information into a Derby database. You are required to use the Joined-Subclass Strategy (detailed on page 170 of the textbook) or Mapped Superclass Strategy (detailed on page 174 to 175 of the textbook) in your design of entities. 3. The company needs to store customer details and customer orders. You are required to use entities to persist customer details and customer orders. The relationship between a customer and his/her orders must be one-to-many unidirectional (detailed on page 156 to 159 of the textbook), i.e. a customer can have multiple orders. To demonstrate success, you are required to implement all the entities and Java standalone applications to persist some example entities and retrieve them later on. To submit your assignment, you need to provide:a. The design of all entities. You are required to describe the structures of these entities, their inheritance hierarchy, or relationship. b. The complete implementation code of the persistence tier, including: Java source code and executable files, the Maven POM file and persistence XML file within a standard Maven directory structure (for example see Listing 2-53, page 63 of the textbook). That means the code can be compiled and run directly in the Java EE environment that is used by this course without any further revision/redevelopment. c. The test instruction. You are required to provide detailed instructions about how a user would run the software to persist at least 2 products, 2 customers, and 2 orders for each customer. Your design and test must be documented in a Word document. You must submit all the required files in a zip file. The maximum mark of this assignment is 20. The marking criteria of this assignment are detailed in next page
4