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

Kaduna Polytechnic Department of Computer Science College of Science and Technology School of Applied Science

This document contains an assignment on the Unified Modeling Language (UML) submitted by Godwin Enejo Daniel. It defines structural and behavioral things in UML and gives examples. It discusses different types of inheritance like single, multiple, multi-level and hybrid. It also includes UML diagrams showing relationships between classes like composition, association and inheritance. The diagrams model entities like a home with rooms, a bank with employees and accounts, and a travel agency system connected to an airline.

Uploaded by

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

Kaduna Polytechnic Department of Computer Science College of Science and Technology School of Applied Science

This document contains an assignment on the Unified Modeling Language (UML) submitted by Godwin Enejo Daniel. It defines structural and behavioral things in UML and gives examples. It discusses different types of inheritance like single, multiple, multi-level and hybrid. It also includes UML diagrams showing relationships between classes like composition, association and inheritance. The diagrams model entities like a home with rooms, a bank with employees and accounts, and a travel agency system connected to an airline.

Uploaded by

Daniel Godwin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

KADUNA POLYTECHNIC

DEPARTMENT OF COMPUTER SCIENCE

COLLEGE OF SCIENCE AND TECHNOLOGY


SCHOOL OF APPLIED SCIENCE

ASSIGNMENT ON UNFIED MODELING LANGUAGE


(UML)

NDIIA

BY

GODWWIN ENEOJO DANIEL


CST20ND0017

1
1.

STRUCTURAL THIINGS BEHAVIORAL THINGS


2
DEFINITION: DEFINITION:
These are the static parts of UML These are the dynamic parts of UML
models, these represents elements that models
are conceptual or physical.

EXAMPLES: (i) Interface (ii) Class EXAMPLES: (i) Interaction (ii) State
machine

2. THE THREE TYPES OF INHERITANCE ARE:

(i) Single inheritance: A subclass device from a single super class.

Example:

EMPLOYEE

EMPLOYEE HAVING PROMOTION

(ii) Multiple inheritance: A subclass derives from more than one super class.

Example:

LION CAT

3
LAND HABITAT

(iii)Multi-level inheritance: A subclass derives from a super class which in turn is


derived from another class and so on.

GRAND-FATHER

FATHER

SON

(iv) Hierarchical Inheritance: A class has a number of subclasses each of which


may have subsequent subclasses, continuing for a number of levels, so as to form
a tree structure.

GRAND-FATHER

4
FATHER

CHILD

(v) Hierachical Inheritance: A class has a number of sub—classes each of which


may have subsequent sub-classes, continuing for a number of levels, so as to form
a tree structure.

Habitat

Land habitat Air habitat Aquatic habitat

Lion Cat Eagle Sparrow Shark Fishes

(vi) Hybrid Inheritance: A combination of multiple and multi-level inheritance so


as to form a frame structure.

5
LAND

CAR BUS

VEHICLE

(3)
KITCHEN
HOME Color: red
1
Size: big
6
Wash()

Cook()
BATHROOM

Color: blue
1 0…* 0…3
Size: small
MAIL BOX GARAGE
Enter()
Size: small Color: black
Bath()
Color: black Size: medium

Post() Enter() BEDROOM


2…*
Receive() Leave() Color: white

Size: medium

Sleep()

Rest()

4)
-manager

BANK EMPLOYEE TELLER/


+id:int OPERATIONMANAGER/
+Bank_id: string
+name:string MARKETERS
+Bank_name:String
7 +sex:boolean
+location:string
+name:string
+Addbank()
+startwork()
+Closebank()
1 1…*

(4b) The types of Relationships used above and why I used them;

1. Composition: The bank itself cannot operate without the use of employees
to run the bank and its day to day activities and also the Teller/operation

8
manager/marketers are off no use if there are no customers for the bank and
the customers need this operation workers to manage their affairs in the bank
(so each classes are dependent on each other).
2. Association: There is a relationship between the bank and its employees and
teller/operation manager/marketers with customers.
3. Inheritance: This here indicates that both savings and current are both
subclasses of the class Account.
4. Reflexive Association: This means an instance of employees can be the
manager of another employee instance.

Travel Agency System

Airline

You might also like