You should be able to answer this question once you have studied Unit 2 (The Object- Oriented Approach) and Unit 4 (Modularity) of the course notes. The objectives of this question are:
Young New Wear Apparel (YNWA), a famous sports apparel shop, is setting up an e- Commerce website to sell its sports jersey, such as soccer jersey, basketball team shirts etc.
A customer can view the details (type, team, model number, size, description and price) of ready-made jerseys. Besides standard team jerseys, a customer can choose to have a customized jersey instead. He can choose to print his name, or print a specific number or customise the size of the jersey for purchase. The system will then need to calculate the price for each custom-made jersey; in this case, the system needs to keep track of the specific customisation request while in this case model number is not relevant.
An admin staff is tasked to update the system whenever stocks are unavailable or restocked The admin staff can also add a new team jersey or remove team jerseys that are outdated.
The company also has corporate clients that usually mass order and customizes jersey for their staff. For corporate clients, the system stores the company name, address, contact number, email address and contact person to liaise with.
Sometimes, a customer may just view the jersey without making any purchase. Occasionally, the customer may also request that a salesperson contact him to discuss the details of the customization of the jersey, negotiate the prices and so on, before an order is actually placed.
The e-commerce site only accepts credit card payment. To place an order, the customer enters his particulars (name, address, contact number, and email address), the delivery address, and payment details (card number, type and expiry date). The system then sends the credit card information and the amount charged to an external payment gateway for authentication. If the credit card transaction is approved, the external payment gateway sends back an approval code and the system stores this as a record. Otherwise, the systems will ask the customer to re-enter another card's information.
Once the orders have been made and the transaction has been cleared, the system sends a confirmation message to the customer with details of his order, including an order number, date of purchase, delivery address and description of items purchased. At the same time, the system sends an electronic request to the warehouse with details of the order to arrange for the packing and delivery of the ordered items.
While waiting for the arrival of the order, customers can check the status of their orders online via the system.
(a) Identify the classes, and their respective attributes, from the above description, using the tabular format in Table Q1(a) below:
Class | Attribut(s) |
(b) Identify the class hierarchy or hierarchies among the classes, naming each class appropriately. Discuss why there should be such a hierarchy or hierarchies with reference to the case description.
(c) Explain whether there should be any abstract class(es) in the class hierarchies or hierarchies in (b) above.
(d)Draw a UML diagram(s) to depict the class hierarchy or hierarchies. Show the attributes (including their respective visibilities and data types) for each class,
(e) Write Java code to implement the complete Jersey class hierarchy. Include the instance variables, constructors (with necessary parameters), the setter and getter methods, and the toString() method.
You should be able to answer this question once you have completed Study Unit 3. The objective of this question is to understand the choice and characteristic of collection classes. For each of the following situations:
(a) YNWA wants to list all available team's jersey on its website. A particular team jersey may be available in away or home jersey and several sizes; however, only one listing should appear on the site. The system allows the jersey to be sorted alphabetically. Team jersey available include: "Liverpool FC", and Chicago Bulls and Barcelona FC.
(b) A popular team jersey is launching a limited edition new jersey and the company is currently accepting pre-order for its next batch of stock. The booking system holds a waiting list of people who have placed their pre-order. Once the stock arrives, the first person waiting on the list will be allocated the jersey and deleted from the list. The first 3 persons waiting for the jersey are Conte, Messi and Sanchez.
You should be able to answer this question after you have studied Study Unit 6 (User Interface Design Principles) and Unit 8 (User Interfaces Development). The objectives of this question are:
Below is a URA's property transaction information page, which you could visit at the following link: https://www.ura.gov.sg/Corporate/ . Three widgets are circled and labelled A, B and C.
After exploring what each of these three widgets can do, describe and discuss:
You should be able to answer this question after you have studied Study Unit 9 (Use Cases). The objectives of this question are:
Construct a use case diagram for the application described in Question 1