Java代写:ICT203 Foundations of Modern Systems Design

Introduction

代写四个Java的小程序,主要考察面向对象程序设计。

Important notes:

  1. Please use the symbols, notations and naming conventions introduced in the course.
  2. For questions in this TMA that require coding answers, marks are allocated for good programming practice such as:
    • using indentation to reflect the structure of the code;
    • using parentheses, where appropriate, to make code more readable;
    • supplying appropriate method comments;
    • using appropriate programming constructs to produce a neat and efficient solution;
    • complying with the naming conventions introduced in the course;
    • effective reuse of available methods.

Question 1

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:

  • to analyse a simple set of requirements for their classes and attributes;
  • to explain the object-oriented approach in system analysis and design
    • to explore the issue of “thing versus property”;
    • to describe the concepts behind modular software design;
    • to recognize an inheritance hierarchy;
    • to implement a generalization relationship.
  • to construct basic class diagrams in system analysis.

The Anime Shop is a popular anime, manga and video game rental chain having 4 branches in Singapore.
The Anime Shop requires a system to support its administrative functions of each of its branch as follows:

  • Rental is only open to members of The Anime Shop. There are 2 types of membership, gold and platinum membership. Gold members can rent up to 6 titles while platinum members can rent up to 10 titles. Platinum members also get a 5% discount on every rental.
  • Given the location of a branch, the system will display all information about the member that signed up with the branch including the name, contact number, address and rental eligibility.
  • It is important to keep track of each unique anime, manga and video game item to list its title, its genre (action, comedy, drama, sci-fi, and so on), its rental type (new release, standard), rating, and other general information such release date, cost and rental price. For anime, additional information like video format should be recorded. For video games, the console type (eg Xbox, PSP or Wii) should be recorded.
  • In response to an enquiry on rental summary, given the rental number of a rental, the system will provide the rental date of the rental, the amount charged, items rented and the status of the rental, (whether returned, overdue or active)

Analyze the above case description, and answer the following questions:
a. Identify the classes, and their respective attributes, from the above description, using the tabular format in Table Q1(a) below.
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. You need not include the methods.
e. Write Java code to implement the Member class. Include the instance variables, constructors (with necessary parameters), the setter and getter methods, and the toString() method.
f. Platinum members have the added privilege of being able to rent 10 items as compared to a gold member’s 6 items. Moreover, platinum members are entitled to a discount of 5% on each rental.

  • (i) Explain how this could be provided in the system.
  • (ii) Write Java code in the classes concerned to implement this.

Question 2

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,

  • write down the name of the collection class you think is most suitable model;
  • give a brief justification for your choice;
  • write Java code to create an instance of the collection class you have chosen, assign it to a suitably named variable, and add the example elements given in the description of the collection.

a. The Anime Shop requires a reservation system for their most popular manga. The reservation system holds a waiting list of members who want to reserve the manga. Once the manga is returned, the first person waiting on the list will be allocated the manga and deleted from the list. The first 3 persons waiting for the manga “One Piece – Anniversary Special” are Xander Ang, Yuki Bong and Zack Zane.
b. The Anime Shop wants to keep track of its member’s rental record. At any point in time, a staff can look up the rental record of any particular member. The staff may also want to sort the members based on the total number of items rented. The 3 shop members with the most number of items rented of “500 items”, “488 items” and “”450 items” are “Xander” (memberID P9812345A), “Yuki” (memberID G9800154J) and “Zack” (memberID G988832Z).
c. The Anime Shop wants to list the titles of the anime, manga and video games available for rent. Should a title be released as an anime, a manga and a video game, the shop would still list it under a single name, which is title. Three very popular titles are, “Naruto”, “One Piece” and “Bleach”.

Question 3

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:

  • to understand the use of scenarios;
  • to apply the design principles for user interfaces.

After exploring what each of these three widgets can do, describe and discuss:

  • its visibility;
  • its affordance;
  • its feedback for the operations you carried out with it (note that feedback from activating the widget is different from any feedback provided by the resulting action);
  • how each of the above aspects could be improved;
  • the effect of prior similar experience of the user when interacting with the user interface.

Question 4

You should be able to answer this question after you have studied Study Unit 9 (Use Cases).
The objectives of this question are:

  • to analyze specified system requirements;
  • to construct use case models in systems analysis.

‘The Anime Shop’ intends to develop a system to track its operations such as membership signup, rentals, stock management and expenses.
When new stocks arrive, the branch staff is tasked with creating the anime, manga and video games information to the system, this includes the title, genre, release date, rental price and quantity available for rent. Spoilt or unrepairable items are also removed from the system by the staff.
The system allows anyone to browse through ‘ The Anime Shop’s ‘ catalogue to view all the available titles the shop offers but only members can rent an item, using either the self-help kiosk or at the counter. Payment for any transaction can be made either via credit card or NETS. The system needs to clear the payment with the respective bank systems.
Interested customers can sign up to be a member at the self-help kiosk or approach a branch staff, who will capture the member’s details such as his name, address and contact number.
The system allows a member to update his personal information, view his rental records and renew his rental.
At the end of every month, ‘The Anime Shop’s’ director will utilise the revenue report and expenses report, to generate the financial report.
Construct a use case diagram for the application (notice that there is a generalization hierarchy among the actors).