0% found this document useful (0 votes)
307 views

Uml Diagram Questions and Answers

The document describes a class diagram for a motor dealer order system with classes for orders and items that can be added, deleted, and have their total value printed. It also describes a telephone book system with classes for entries that can be looked up and entries that can be inserted, deleted, modified, and have reports printed by an administrator. A student class is described that can accept details and display them, with a marks class that inherits from it and can calculate results. A use case diagram is described for a library system with use cases for borrowing, reserving, returning, and updating books and journals.

Uploaded by

Daisy Mercy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
307 views

Uml Diagram Questions and Answers

The document describes a class diagram for a motor dealer order system with classes for orders and items that can be added, deleted, and have their total value printed. It also describes a telephone book system with classes for entries that can be looked up and entries that can be inserted, deleted, modified, and have reports printed by an administrator. A student class is described that can accept details and display them, with a marks class that inherits from it and can calculate results. A use case diagram is described for a library system with use cases for borrowing, reserving, returning, and updating books and journals.

Uploaded by

Daisy Mercy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. A motor dealer makes an order for various items.

An order comprises a list of required


parts each identified by part-number, name-of-item, and item-price. It is possible to
perform operations like adding an item in the order list, deleting an item from the list and
printing the total value of the order.

Required:
a) Identify the class (es) in the above description and construct a class diagram
showing any relationship, the operations and data members.
(5 marks)

2. Use the following case to identify Classes and Operations. Associate the operations with
the appropriate classes.
(10 marks)

Computerized Telephone Book for a university


 The telephone book should contain entries for each person in the university
community--student, professor, and staff member.
 Users of the directory can look up entries. In addition, the administrator of the
telephone book can, after supplying a password, insert new entries, delete existing
entries, modify existing entries, print the telephone book, and print a listing of all
students or of all faculty.
3. Declare a class called student with members such as name,
stud_number,accept_stud_details(),display_details(). Declare another class called marks
which inherits from student and has members such as mark1,mark2,result and
calculate_result(). Use your discretion to determine which members will be private and
which will be public. You may also add other access members to complete the
declaration. Remember that variable names ending with () are functions.
(6 marks)

4. Draw a Use Case diagram for the following specification:


A college library requires an information system to hold and manipulate information on
books and journals available for borrowing by students and academic staff. The system
would be operated by the library counter staff and the system manager. It is the responsi-
bility of the counter staff to register members, both students and academic staff. Students
are allowed to borrow up to ten items while academic staff are allowed to borrow up to
twenty items. Members are allowed to browse the Catalogue, reserve and borrow books
and journals, and are required to return any borrowed items within two weeks. The man-
ager is responsible for updating the catalogue, including adding and deleting books and
journals, and for producing usage reports. (6 marks)

5. Let us consider a patient being admitted to hospital for treatment of a simple


hernia.

 Patient arrives at reception


 Patient gives personal details and is given a form
 Patient goes to ward and hands in form
 Patient is interviewed by nurse and gives medical details
 Patient is interviewed by aneasthetist and gives the same medical details
 Patient is examined by consultant
 Patient is given a pre-med injection
 Patient is taken to surgery
 Patient is given anaesthetic
 Patient is operated on
 Patient is returned to ward
 Patient is examined duty doctor
 Patient is examined by nurse
 Patient is examined by consultant
 Patient is discharged

Required: Construct the object interaction diagram for the above case scenario
(10 marks)
6. When ordering new videotapes from a supplier, the store manager creates a
purchase order, fills in the date, the supplier’s name , address, and enters
a list of videotapes to be ordered. The purchase order is added to a
permanent list of purchases. When one or more video tapes are received
from a supplier, a clerk locates the original purchase order and makes a
record of each tape that was received. A record of the videotape is then
added to the store’s inventory. When all tapes listed on a particular
purchase order have been received, the manager sends a payment to the
supplier and the purchase order is given a completion date.

Required:
1) Construct a sequence diagram for the scenario above 10 marks

You might also like