0% found this document useful (0 votes)
498 views3 pages

Class Diagram Question With Solutions

The document describes a task to create a class diagram for a public library system. A library has members who can borrow items like books and movies. Each member has an account to track borrowed items and fees. Borrowed items have due dates, and late fees are charged if an item is returned after its due date.

Uploaded by

Doaa Rezk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
498 views3 pages

Class Diagram Question With Solutions

The document describes a task to create a class diagram for a public library system. A library has members who can borrow items like books and movies. Each member has an account to track borrowed items and fees. Borrowed items have due dates, and late fees are charged if an item is returned after its due date.

Uploaded by

Doaa Rezk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Exercise

Task 1: Create a class diagram for a web based public library. A public library typically stores a

collection of books, movies, or other library items available to be borrowed by people living in a

community. Each library member typically has a library account and a library card with the account’s

ID number, which she can use to identify herself to the library. A member’s library account records

which items the member has borrowed and the due date for each borrowed item. Each type of item

has a default rental period, which determines the item’s due date when the item is borrowed. If a

member returns an item after the item’s due date, the member owes a late fee specific for that item,

an amount of money recorded in the member’s library account

Solution:
Task 2: Create a class diagram based on the following description. You have been asked to build
a management system for a group of archeologists. The group is comprised of multiple teams of
researchers. Each team has a letter ID (e.g., team A, team B). Each researcher belongs to one of the
teams, and has an ID number, a first name, and a last name. There are two types of researchers: field
and lab staff. Each field staff member has a favorite region (string). Each lab researcher supports up
to 2 field researchers. Some researchers may not be supported by a lab researcher. The company also
manages an inventory of equipment. Researchers of any type may check out up to 3 pieces of
equipment. Each piece of equipment has a serial number and replacement cost.
Solution:
Task 3: Imagine that you are tasked with developing a system for a pizza shop. Given the following
description, create a class diagram (in the form of a UML class diagram). Include all conceptual classes,

attributes, associations, and generalization relationships mentioned in the descriptions. Label all

associations and include all multiplicities.

A customer places orders. A customer has a name and phone number. There are two types of orders:

pick-up and delivery. A pick-up order has a pick-up time. A delivery order has an address and deliver-

by time. All orders consist of a set of items. There are two types of items: pizzas and drinks. All items

have a price. A pizza has a size and a crust type. A pizza also has a number of toppings. A topping has

a topping type and a price. Some pizzas are special pizzas that have a name (e.g., “Hawaiian” or “Meat

Lovers”). A drink has a brand and a flavor

Solution:

You might also like