You are on page 1of 32

Software Engineering

Software Analysis & Design


How to Analyze and Design ?
• Since we already understand the concept of OOP, we can
now able to analyse software and create designs from it.

• Before we proceed with analysing software and creating its


design, we need the software requirements. Without the
requirements specification, there is no reason to create
software.
Analysis Flow
Customer Requirements

Analyze

Functional Non-functional
Requirement Requirement

Requirement
Specification
Analyzing Requirements
• Before we can create a design, we have to analyse the software
requirements first.

• As for example, we will analyse the requirements for “Simple Library


Borrow Record System”

Midterm Project
Simple Library Borrow Record System
Analyzing Requirements
• Understand the requirements and extract the main functionality of
the software.
• Get the supplemental function and non-functional requirements
• Formulate other non-functional requirements that improves the
software requirements.
• Write all gathered requirements in “Requirement Specification Sheet”
Requirements Specification Sheet:
• From this customer requirements will turn into requirements
specification sheet. (click object to open)

No. Main Function


OUTPUT
Require ment Tasks Non Functional Items Detaile d Remarks
Holds data for Student's A. Each record is unique and will not accept duplicate student
It is composed of Students' Record with Data Validity

INPUT
1 Library Record Record with Book Records of record.
corresponding Book Records Limited Entry
the Library System B. It is only limited to 20 records
It is composed of Student's Record:
Contains the detailed
ID Number
information about the student
Name
in this record. The user must Data Validity A. Information must be valid.
2 Student Record Course and Year Level
input the student's
Number of books borrowed
information and save it in this
Total Price of borrowed books
record
It is composed of Book's Record:
Book ID
Contains the detailed
Title
information about the book in
Author
this record. The selected book A. Information must be the same with the selected book.
Price Data Validity
3 Book Records will be saved in this record B. Information must be valid for Borrow/Return Date.
Duration Limited Entry
and also save the C. Record is limi ted to 5 only
Borrow Date
borrow/return data and its
Return Date
book status.
Status

A.Predefined list of 15 items.


B. Information must be displayed in tabul ar form based from the
Book Records format at item#3.
Shows the list of books in
C. Book Information unique except for the price and duration.
List of predefined books. This list must be tabular form. This display will
Data View D. Book status must be displayed in 2 color format:
viewed as the same information as the Book be used by user for book
4 List of Books Data Selection **AVAILABLE -> GREED
Records at #3. The information must be selection. The selected book is
Limited List **BORROWED -> RED
displayed in tabular form. base d on Book ID and will be
E. The Book cannot be selected if books status is BORROWED.
judge based on Book Status
F. In selecting the book, the user must input the Book ID and
update the book list and add same information to the Book Record.

This menu display will let the user choose


the operation:
1. Add Student’s Information
2. Borrow Book The User must choose 1 A. A specific ope ration will be performed after selecting.
5 Menu N/A
3. Return Book operation

Midterm Project
4. View Record
5. Exit

Asks the user to supply this information: A. Information must be valid.


Add Student's The user must completely Data Validity
ID Number B. Student ID must be unique.
6 Information input the corresponding Data Entry
Name C. Check if the student ID is not in the library record.
Operation information
Course and Year Level D. This information will be saved in Student Record
Must select a student from the Student
Record by entering the student ID.
A. Input information must be vali d.
List of books will be displayed for selection
B. Cannot proceed this operation if there are no existing student

Simple Library Borrow Record System


and select a book by ente ring its Book ID. Data Validity
record.
Borrow Book Supply the needed information and then it The user must input the Data Entry
7 C. Cannot borrow book if its status is BORROWED
Operation will display the selected books. It will ask for corresponding information Confirmation
D. Ask for confirmation to procee d for borrowing selected books
confirmation to proceed and then the user
must input the suffi cient money. If all are
satisfied, the borrowed books will be in
BORROWED status.
Shows the list of library record and let the
A. Input information must be vali d.
user choose the record by Student ID. Then it
B. Cannot proceed this operation if there are no existing student
will display all the books borrowed and let
Data Validity record.
Return Book the user choose the book to be returned by The user must input the
8 Confirmation C. Cannot return book if there is no existing book record
Operation entering the Book ID. It will ask for corresponding information
D. Ask for confirmation to procee d for borrowing selected books
confirmation to proceed. If all are satisfied,
the borrowed books will be in AVAILABLE
status
Show the list of library re cordand let the
user choose the record by entering the A. Displays existing record of Student and Book
Vie w Record Displays the Student Record Data Validity
9 Student ID. It will show the student's B. Display of each record must be in tabular form
Operation and its Book Record Data View
information from the record and show all of C. All information must be valid and consistent
its borrowed book from the book record.
How to create design ?
• Once we finished analysing the requirements, we can now able to
create the design for the software.

• In designing the software, you have to decide what methodologies you


are going to apply. It could be an OOP design or Procedural design, etc.

• Design Deliverables:
• Detailed Class Diagram
• Sequence Diagram
Design Flow – Class Diagram
For collection of data such as
Structures records, database, etc

To make data readable rather


Requirements Enums than constant numbers
Specification

Grouped by its
Classes functionality/responsibility
Design

Class Type Interface ? Normal ?

Analyse each
requirements and
formulate its design Methods Functionality
based on its functionality
or purpose
Relation to other
Relationship classes
Design Flow – Class Diagram
For the sake of example, we will use the “Requirements Specification
Sheet” of Simple Library System. (click object to open)
INPUT
OUTPUT
No. Main Function Requirement Tasks Non Functional Items Detailed Remarks
Holds data for Student's A. Each record is unique and will not accept duplicate student
It is composed of Students' Record with Data Validity
1 Library Record Record with Book Records of record.
corresponding Book Records Limited Entry
the Library System B. It is only limited to 20 records
It is composed of Student's Record:
Contains the detailed
ID Number
information about the student
Name
in this record. The user must Data Validity A. Information must be valid.
2 Student Record Course and Year Level
input the student's
Number of books borrowed
information and save it in this
Total Price of borrowed books
record

It is composed of Book's Record:


Book ID
Contains the detailed
Title
information about the book in
Author
this record. The selected book A. Information must be the same with the selected book.
Price Data Validity
3 Book Records will be saved in this record B. Information must be valid for Borrow/Return Date.
Duration Limited Entry
and also save the C. Record is limited to 5 only
Borrow Date
borrow/return data and its
Return Date
book status.
Status

A.Predefined list of 15 items.


B. Information must be displayed in tabular form based from the
Book Records format at item#3.
Shows the list of books in
C. Book Information unique except for the price and duration.
List of predefine d books. This list must be tabular form. This display will
Data Vie w D. Book status must be displayed in 2 color format:
viewed as the same information as the Book be used by user for book
4 List of Books Data Selection **AVAILABLE -> GREED
Records at #3. The information must be selection. The selecte d book is
Limited List **BORROWED -> RED
displayed in tabular form. based on Book ID and will be
E. The Book cannot be selected if books status is BORROWED.
judge based on Book Status
F. In selecting the book, the user must input the Book ID and
update the book list and add same information to the Book Record.

This menu display will let the use r choose


the operation:
1. Add Student’s Information
2. Borrow Book The User must choose 1 A. A specific operation will be performed after sele cting.
5 Menu N/A
3. Return Book operation
4. View Record
5. Exit

Asks the user to supply this information: A. Information must be valid.


Add Student's The user must completely Data Validity
ID Number B. Student ID must be unique.
6 Information input the corresponding Data Entry
Name C. Check if the student ID is not in the library record.
Operation information
Course and Year Level D. This i nformation will be saved in Student Record
Must select a student from the Student
Record by entering the student ID.
A. Input information must be vali d.
List of books will be displ ayed for selection
B. Cannot procee d this operation if there are no existing student
and select a book by entering its Book ID. Data Validity
record.
Borrow Book Supply the needed information and then it The user must input the Data Entry
7 C. Cannot borrow book if its status is BORROWED

Siimple Library System Design.asta


Operation will display the selected books. It will ask for corresponding information Confirmation
D. Ask for confirmation to proceed for borrowing selected books
confirmation to proceed and then the user
must input the suffi cient money. If all are
satisfied, the borrowed books will be in
BORROWED status.
Shows the list of library record and let the
A. Input information must be vali d.
user choose the record by Student ID. Then it
B. Cannot procee d this operation if there are no existing student
will display all the books borrowed and let
Data Validity record.
Return Book the user choose the book to be returned by The user must input the
8 Confirmation C. Cannot return book if there is no existing book record
Operation entering the Book ID. It will ask for corresponding information
D. Ask for confirmation to proceed for borrowing selected books
confirmation to proceed. If all are satisfied,
the borrowed books will be in AVAILABLE
status
Show the list of library re cordand let the
user choose the record by entering the A. Displays existing record of Student and Book
View Record Displays the Student Record Data Validity
9 Student ID. It will show the student's B. Display of each record must be in tabular form
Operation and its Book Record Data Vie w
information from the record and show all of C. All information must be valid and consistent
its borrowed book from the book record.
Design Flow – Class Diagram
Create design for the Functional Requirements first and follow the Non-
Functional Requirements.
1. Create design of structure and enums.
2. Create class based from requirements’ responsibility.
2.1. Decide the type of class.
2.2. Decide its methods
2.3 Decide its relationship to other classes
3. Repeat 2.2 to continuously Add or Update Class methods from the
requirements.
Design Flow – Class Diagram
1. Create design of structure and enums. (Input)
Design Flow – Class Diagram
1. Create design of structure and enums. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (input)
Design Flow – Class Diagram
• 2. Create class based from requirements’ responsibility. (output)
Design Flow – Class Diagram
• After designing the class diagram, you can now proceed in creating
the sequence diagram.

• When you created your design based from requirements, it is not yet
the final design because there might be some changes in the design
that does not satisfy with the implementation. Therefore, any
changes must update the design.
Design – Sequence Diagram
• Sequence diagram is much more detailed diagram than class diagram
because it shows relationship between classes.

• Sequence diagram is also the basis of how to call methods of


interacting classes.
How to create sequence diagram ?
• For the sake of example we will continue designing the “Simple
Library Record System”

Open this object and we will create sequence diagram.

Siimple Library System Design.asta


Creating Sequence Diagram Flow
1. Right click folder
2. Select Create Diagram
3. Choose Add Sequence
Diagram
Creating Sequence Diagram Flow
• After adding sequence diagram, you have to rename “Sequence
Diagram0” from the Requirements’ Operation Items
Creating Sequence Diagram Flow
• From the Requirements Specification of “Simple Library Record
System”, we have to look what are the operations/actions. We will use
the class diagram we created and show its relationship.

Requirements
Specification

Sequence Diagram

Class Diagram
Creating Sequence Diagram Flow

There are 5 main operations


from the requirements
specification, so we will create
sequence diagrams for each
operations
Creating Sequence Diagram Flow
• You can now proceed with the implementation since you already
finished with the sequence diagram. Take note that there might be
changes in the design if it does not satisfy in the implementation

Siimple Library System Design.asta

You might also like