Skip to document

CS 3203 Software Engineering Lab 3

CS 3203 Software Engineering Lab 3
Course

Software Engineering (CS391)

174 Documents
Students shared 174 documents in this course
Academic year: 2021/2022
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Fayoum University

Comments

Please sign in or register to post comments.

Preview text

Systems models

2. Class Diagram

o Class diagrams are describing the static structure of a system. o It shows the static structures of the system o Classes represent an abstraction of entities with common characteristics. Associations represent the relationships between classes.

Relationship Type

1. Associations

o Associations represent static relationships between classes.

2. Multiplicity

o Place multiplicity notations near the ends of an association. These symbols indicate the number of instances of one class linked to one instance of the other class. For example, one company will have one or more employees, but each employee works for one company only.

CS 3203 Software Engineering (1) – 2020/2021 Lab (3)

3. Generalization

o Generalization is another name for inheritance or an "is a" relationship. It refers to a relationship between two classes where one class is a specialized version of another. For example, Honda is a type of car. So, the class Honda would have a generalization relationship with the class car.

4. Composition and Aggregation

Aggregation:

o A special type of association. o It represents a "part of" relationship. o Class2 is part of Class1. Composition:

o A special type of aggregation where parts are destroyed when the whole is destroyed. o Class2 cannot stand by itself.

Example 2:

UML class diagram which shows a domain model for online shopping. The purpose of the diagram is to introduce some common terms, "dictionary" for online shopping - Customer, Web User, Account, Shopping Cart, Product, Order, Payment, etc. and relationships between. It could be used as a common ground between business analysts and software developers. Each customer has unique id and is linked to exactly one account. Account owns shopping cart and orders. Customer could register as a web user to be able to buy items online. Customer is not required to be a web user because purchases could also be made by phone or by ordering from catalogues. Web user has login name which also serves as unique id. Web user linked to a shopping cart. Shopping cart belongs to account. Account owns customer orders. Customer orders are sorted and unique. Each order could refer to several payments, possibly none. Every payment has unique id and is related to exactly one account. Both order and shopping cart have line items linked to a specific product. Each line item is related to exactly one product. A product could be associated to many line items or no item at all.

Example 3:

A token-ring based local-area-network (LAN) is a network consisting of nodes, in which network packets are sent around. Every node has a unique name within the network, and refers to its next node. Different kinds of nodes exist: workstations are originators of messages and servers. We can receive messages by network nodes Printer or fileserver. Packets contain an originator, a destination and content, and are sent around on a network. A LAN is a circular configuration of nodes.

Example 4:

This class diagram example shows several important classes, such as Customer, Reservation, Ticket, and Performance: - Customers may have many reservations, but each reservation is made by one customer. - Reservations are of two kinds: subscription series and individual reservations. - Both reserve tickets: in one case, only one ticket; in the other case, several tickets. Every ticket is part of a subscription series or an individual reservation. - Every performance has many tickets available, each with a unique seat number.

Was this document helpful?

CS 3203 Software Engineering Lab 3

Course: Software Engineering (CS391)

174 Documents
Students shared 174 documents in this course

University: Fayoum University

Was this document helpful?
Eng. Yossr - Eng. Esraa
1
Systems models
2. Class Diagram
o Class diagrams are describing the static structure of a system.
o It shows the static structures of the system
o Classes represent an abstraction of entities with common characteristics. Associations
represent the relationships between classes.
Relationship Type
1. Associations
o Associations represent static relationships between classes.
2. Multiplicity
o Place multiplicity notations near the ends of an association. These symbols indicate the
number of instances of one class linked to one instance of the other class. For example, one
company will have one or more employees, but each employee works for one company only.
CS 3203 Software Engineering (1) 2020/2021
Lab (3)