Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

Lab File

Software Engineering
[IT301]

Submitted to: Submitted By:


Dr. Vasudha Vashisht Shivam Tripathi
A2305219629
6CSE-9Y

Department of Computer Science and Engineering


Amity School of Engineering and Technology
Amity University Uttar Pradesh, Noida

Index
S.No. UML Diagram Page No.
1 Draw an ER diagram for 1
hospital management system.
2 Draw level-0 DFD and level-1 5
DFD for ATM Machine.
3 Draw a use case diagram for 8
Parking Management System.
4 Draw object diagram for 13
home automation system.
5 Draw a use case diagram 15
for alarm clock system.
6 Draw a state transition 18
diagram for 3-digit lock
system.
7 Sequence Diagram for Cut, 22
Copy and Paste operation
8 Draw an activity diagram 28
for library system.
9 Draw a component diagram 30
for E-Commerce Website.
Diagram 1: Entity Relationship Diagram

Aim: Draw an ER diagram for hospital management system.


Class Diagram:
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as
people, objects or concepts relate to each other within a system. ER Diagrams are most often used to
design or debug relational databases in the fields of software engineering, business information
systems, education and research. Also known as ERDs or ER Models, they use a defined set of
symbols such as rectangles, diamonds, ovals and connecting lines to depict the interconnectedness of
entities, relationships and their attributes. They mirror grammatical structure, with entities as nouns
and relationships as verbs.

List of Entities: -
1. New Patient:
Attributes:
i. Patient’s Name: Name of Patient registering.
ii. Age: Age of Patient. iii. DOB: Date of Birth
of the patient. iv. Patient ID: Unique Patient ID
generated.
v. Contact Number: Contact number of the Patient.
vi. Patient’s Gender: Gender of the Patient.
vii. Patient’s Address: Address of the Patient.
2. Registered Patients:
Attributes:
i. Patient Name: Name of Already Registered Patients.
ii. Patient ID: Unique Identification ID of already registered
patient.
iii. Patient Age: Age of the patient.

3. Doctors:
Attributes:
i. Doctor Name: Associated with the car of the owner. It is
also unique.

ii. Doctor ID: Unique Identification number of the Doctor. iii.

Doctor Contact Number: Doctor’s Contact number.

4. Appointment:
Attributes:

1
i) Doctor ID: Doctor’s ID. ii)
Appointment ID: Appointment’s ID. iii)
Patient’s Name: Patient’s Name. iv)
Patient’s ID: Patient’s ID.

5. Treatment:
Attributes:
i) Diseases: Name of Disease/s patient is suffering from. ii)
Doctor’s Remark: Doctor’s remark post examination. iii)
Prescribed Medicine: Medicines Prescribed.

List of Relations:
1. Admitted
2. Patient’s Record
3. Serving Doctors
4. Gets treated

Diagram:

1
1
Diagram 2: Level-0 Data Flow Diagram and Level-1
Data Flow Diagram.

Aim: Draw level -0 DFDand level 1 DFD for Airticket reservation.

Use Case Diagram:


A Data Flow Diagram (DFD) is a traditional visual representation of the information flows within a
system. A neat and clear DFD can depict the right amount of the system requirement graphically. It
can be manual, automated, or a combination of both.
It shows how data enters and leaves the system, what changes the information, and where data is
stored. The objective of a DFD is to show the scope and boundaries of a system as a whole. It may
be used as a communication tool between a system analyst and any person who plays a part in the
order that acts as a starting point for redesigning a system. The DFD is also called as a data flow
graph or bubble chart.

List of Processes: -

1. Card Verification: Verifying the Card inserted by the Consumer.


2. Display Consumer Operations: Display the list of possible operations.
3. Service Selection: Selecting one of the listed operations.
4. Cash Storage: Storing the cash into the cash bin in the case of Deposit and
Removing Cash from the cash bin in the case of Withdrawal.
5. Receipt Printer
6. Check for Available Funds
7. Database updating

1
Diagram:

1
1
Diagram 3: Use Case Diagram

Aim: Implement the Use-Case Diagram for Health Monitoring System

State diagram: A use case illustrates a unit of functionality provided by the system
from the end user's perspective. The main purpose of the use-case diagram is to help
development teams visualize the functional requirements of a system, including the
relationship of “actors” (human beings who will interact with the system) to
essential processes, as well as the relationships among different use cases. It only
summarizes some of the relationships between use cases, actors, and systems. It
does not show the order in which steps are performed to achieve the goals of each
use case.

List of Use Cases:


1. Determining Charging Policy:
a. Intro: Determining The Charging policy of the Parking.
b. Participating User: Mall Security Manager.
c. Flow of Events: It is included in Calculating the running costs.
d. Alternate Flow: N/A
e. Pre-condition: N/A
f. Post-condition: These charges are implemented on the customers.

2. Calculate Running Costs:


a. Intro: Calculating the running cost of the parking lot.
b. Participating User: Car-Park Manager
c. Flow of Events: Further it leads to Tracking the usages
d. Alternate Flow: N/A
e. Pre-condition: There must be a pre-determined charging policy
implemented by the Mall Authority.
f. Post-condition: These Costs can be monitored by the participating user.

3. Tracking Usage:
a. Intro: The toll-fare can change depending on the type of roadway, namely in
expressways and highways
b. Participating User: Toll-Plaza Authority
c. Flow of Events: It is used by Charge Customer.
d. Alternate Flow: NA
e. Pre-condition: Customer must enter the car parking.
f. Post-condition: Customer is charged based on hrs parking used by the
customer.

1
4. Manages Car Park Resources:
a. Intro: Managing all the resources in the Parking System.
b. Participating User: Car-Park Manager
c. Flow of Events: It includes Manage Customers.
d. Alternate Flow: NA
e. Pre-condition: There must be at least 1 customer.
f. Post-condition: It will monitor the Entry and Exit of the Customer.

5. Enter Car Parking:


a. Intro: The Customer Enters the parking.
b. Participating User: Car-Driver
c. Flow of Events: It triggers the database to record the customer’s data and
opens the physical access control.
d. Alternate Flow: NA
e. Pre-condition: There should be a customer.
f. Post-condition: Customer’s Data is recorded and will be used to monitor the
time for which customer’s car is parked inside the parking.

6. Manage Customers:
a. Intro: Managing all the customers whose cars are parked inside the parking.
b. Participating User: Car-Park Operator
c. Flow of Events: It Checks for Entering and Exiting Customers
d. Alternate Flow: NA
e. Pre-condition: There must be customers present inside the parking lot.
f. Post-condition: It monitors all the customers.

7. Exit Car Parking:


a. Intro: The Customer Exits the Parking lot.
b. Participating User: Car-Driver
c. Flow of Events: It triggers the Charge Customer which calculates the total
usage and then computes the total cost of parking.
d. Alternate Flow: NA
e. Pre-condition: The Same car must enter the Parking Lot.
f. Post-condition: It will open the Physical access control barrier for the
customer after successful payment of the parking fee.

8. Record Customer:
a. Intro: It maintains the record of customers entering and exiting the parking
lot.
b. Participating User: Mall-Security Manager
c. Flow of Events: NA
d. Alternate Flow: NA
e. Pre-condition: There should a customer.
f. Post-condition: NA

9. Physical Control Access:

1
a. Intro: It manages the physical boom-barriers present at the Entry/Exit of the
parking lot.
b. Participating User: Car-Driver, Car-Park Operator
c. Flow of Events: If the customer is entering the parking lot then the barrier
will allow customer to enter after the customer successfully collects the
parking ticket and if the customer is exiting the parking lot then the barrier
will open only after the successful payment of the parking fee.
d. Alternate Flow: NA
e. Pre-condition: The customer either should enter the parking or exit the
parking.
f. Post-condition: The Record is being updated.

10. Charge Customer:


a. Intro: It Charges the customer as per the hours spent in the parking.
b. Participating User: Car-Park Operator
c. Flow of Events: N/A
d. Alternate Flow: NA
e. Pre-condition: The Customer must enter the parking lot.
f. Post-condition: NA

List of Actors:
1. Car Park Manager
2. Car Driver
3. Mall Security Manager
4. Car Park Operator

Diagram:

Diagram 4: Object Diagram

Aim: Draw object diagram for home automation system.

Object Diagram: An object diagram shows the relation between the instantiated
classes and the defined class, and the relation between these objects in the system.
They are be useful to explain smaller portions of your system, when your system
class diagram is very complex, and also sometimes modelling recursive relationship
in diagram.
Basic components of object diagram:
1. Object Names: Every object is actually symbolized like a rectangle, that
offers the name from the object and its class underlined as well as divided
with a colon.

1
2. Object Attributes: Similar to classes, you are able to list object attributes
inside a separate compartment. However, unlike classes, object attributes
should have values assigned for them.

3. Links: Links tend to be instances associated with associations. You can draw
a link while using the lines utilized in class diagrams.

Steps to create an object diagram:


1. Identify the mechanism you'd like to model. A mechanism represents some
functions or behaviours of the part of the system you are modelling that
results from the interaction of a society of classes, interfaces, and other
things.
2. For each mechanism, identify the classes, interfaces, and other elements that
participate in this collaboration; identify the relationships among these things,
as well.
3. Consider one scenario that walks through this mechanism. Freeze that
scenario at a moment in time, and render each object that participates in the
mechanism.
4. Expose the state and attribute values of each such object, as necessary, to
understand the scenario.

Diagram:

1
Name:

Rakshit Batra
Enrolment No.: A2305219604
Section: 6CSE-9Y

1
Diagram 5: Use Case Diagram

Aim: Draw a use case diagram for alarm clock system.

Use Case Diagram: A use case illustrates a unit of functionality provided by the
system from the end user's perspective. The main purpose of the use-case diagram is
to help development teams visualize the functional requirements of a system,
including the relationship of “actors” (human beings who will interact with the
system) to essential processes, as well as the relationships among different use cases.
It only summarizes some of the relationships between use cases, actors, and
systems. It does not show the order in which steps are performed to achieve the
goals of each use case.
List of Use Cases:
1. Change Format
2. 24hrs
3. 12hrs
4. Set Time
5. Set Alarm
6. Set Ringtone
7. Time
8. Alarm Rings
9. Snooze 1 min.
10. Off after 2 min.
Actor: User

1
Diagram:

Diagram 6: State Transition Diagram

Aim: Draw a state transition diagram for 3-digit lock system.

1
State Transition Diagram: State-transition diagrams describe all of the states
that an object can have, the events under which an object changes state
(transitions), the conditions that must be fulfilled before the transition will occur
(guards), and the activities undertaken during the life of an object (actions).
Statetransition diagrams are very useful for describing the behavior of individual
objects over the full set of use cases that affect those objects. State-transition
diagrams are not useful for describing the collaboration between objects that cause
the transitions.

Diagram:

Diagram 7: Sequence Diagram

Aim:
a) Draw a sequence diagram showing what happens when the editor receives a cut message from
a client. The effect of this is that all the currently selected elements are moved to the
clipboard.
b) Draw a sequence diagram showing what happens when the editor receives a copy message
from a client. The effect of this is that all the currently selected elements are copied to the
clipboard. Assume that elements implement a 'clone' operation, which returns an exact copy
of the element.

c) Draw a sequence diagram showing what happens when the editor receives a paste message
from a client. The effect of this is that all the elements on the clipboard are moved back to the
editor.

Sequence diagrams are a popular dynamic modeling solution in UML because they
specifically focus on lifelines, or the processes and objects that live simultaneously,
1
and the messages exchanged between them to perform a function before the lifeline
ends.

Sequence diagrams can be useful references for businesses and other organizations.
Try drawing a sequence diagram to:

1. Represent the details of a UML use case.


2. Model the logic of a sophisticated procedure, function, or operation.
3. See how objects and components interact with each other to complete a process.
4. Plan and understand the detailed functionality of an existing or future scenario.

Use cases for sequence diagrams

The following scenarios are ideal for using a sequence diagram:

1. Usage scenario: A usage scenario is a diagram of how your system could


potentially be used. It's a great way to make sure that you have worked
through the logic of every usage scenario for the system.
2. Method logic: Just as you might use a UML sequence diagram to explore the
logic of a use case, you can use it to explore the logic of any function,
procedure, or complex process.
3. Service logic: If you consider a service to be a high-level method used by
different clients, a sequence diagram is an ideal way to map that out.
Common message symbols

Use the following arrows and message symbols to show how information is
transmitted between objects. These symbols may reflect the start and execution of an
operation or the sending and reception of a signal

Diagram:

1
Diagram 8: Activity Diagram

Aim: Draw an activity diagram for library system.

Activity Diagram: An activity diagram portrays the control flow from a start point
to a finish point showing the various decision paths that exist while the activity is
being executed. We can depict both sequential processing and concurrent processing
of activities using an activity diagram. They are used in business and process
modelling where their primary use is to depict the dynamic aspects of a system.

Diagram:

1
Rakshit Batra A2305219604 6CSE9-Y

Diagram 9: Component Diagram

Aim: Draw a component diagram for E-Commerce Website.

Component diagram: Component diagram is a special kind of diagram in


UML. The purpose is also different from all other diagrams discussed so far.
It does not describe the functionality of the system but it describes the
components used to make those functionalities.

Thus, from that point of view, component diagrams are used to visualize the
physical components in a system. These components are libraries, packages,
files, etc.
1
Component diagrams can also be described as a static implementation view
of a system. Static implementation represents the organization of the
components at a particular moment.

A single component diagram cannot represent the entire system but a collection
of diagrams is used to represent the whole.

The purpose of the component diagram can be summarized as −

• Visualize the components of a system.

• Construct executables by using forward and reverse engineering.

• Describe the organization and relationships of the components.

How to draw Component Diagram:

Component diagrams are used to describe the physical artifacts of a system. This
artifact includes files, executables, libraries, etc.

The purpose of this diagram is different. Component diagrams are used during
the implementation phase of an application. However, it is prepared well in
advance to visualize the implementation details.

Initially, the system is designed using different UML diagrams and then when
the artifacts are ready, component diagrams are used to get an idea of the
implementation.

This diagram is very important as without it the application cannot be


implemented efficiently. A well-prepared component diagram is also
important for other aspects such as application performance, maintenance, etc.

Before drawing a component diagram, the following artifacts are to be identified


clearly:

Rakshit Batra A2305219604 6CSE9-Y

• Files used in the system.

• Libraries and other artifacts relevant to the application.

• Relationships among the artifacts.

After identifying the artifacts, the following points need to be kept in mind:

1
• Use a meaningful name to identify the component for which the
diagram is to be drawn.

• Prepare a mental layout before producing the using tools.

• Use notes for clarifying important points.

Diagram:

Name: Rakshit Batra


Enrolment No.: A2305219604
Section: 6CSE9-Y

1
1

You might also like