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

Class Diagram Practice Questions

The document provides class/object diagram practice questions and examples to model relationships between classes such as associations, aggregations, compositions and generalizations. It includes questions to identify relationships between classes such as school-related classes and file system classes. It also provides examples to model a system that tracks sports league matches and a banking system with customer accounts and transactions.

Uploaded by

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

Class Diagram Practice Questions

The document provides class/object diagram practice questions and examples to model relationships between classes such as associations, aggregations, compositions and generalizations. It includes questions to identify relationships between classes such as school-related classes and file system classes. It also provides examples to model a system that tracks sports league matches and a banking system with customer accounts and transactions.

Uploaded by

Saab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

INTRODUCTION TO

SOFTWARE DEVELOPMENT
Class/object diagram practice questions
 Identify the relationships as associations, aggregations,
compositions or generalizations. Also determine
multiplicity.
 A person plays for a team in a certain year.
 A country has a capital city
 A dining philosopher is using a fork
 A file is an ordinary file or a directory file
 Files contains records
 A polygon is composed of an ordered set of points
 Modems and keyboards are I/O devices
 A student takes a course from a professor
 Prepare class diagrams that include the following
classes and identify at least 10 relationships between
them. Include attributes of classes, operations and
multiplicity.
 School, playground, principal, school board, classroom,
book, student, teacher cafeteria, rest room, computer, desk,
chair, ruler, door, swing.
 File system, file, directory, file name, ASCII file, executable
file, directory file, disk drive, track, sector
 Sink, freezer, refrigerator, table, light, switch, window, smoke
alarm, burglar alarm, cabinet, bread, cheese, ice, door,
kitchen
 Consider modeling a system that tracks results of
matches being played in a league like the English
premier league for football or IPL for cricket. The
league has a number of teams. Each team
comprises of players. The league has one season
per calendar year. Every season, matches are
conducted between teams. Every match is played at
a venue.
 Model a class diagram for a banking system. In the
bank, each customer has one or more bank
accounts. Bank accounts are of two types, a savings
account and a checking account. The customer can
have a debit card against his savings account. The
customer can perform multiple types of transactions
against his accounts. These transactions are mainly
of two types, deposit and withdrawal transactions.
Deposits can be made via cash or cheque.
Withdrawals can be made via the debit card or
cheque.

You might also like