Software Engineering Tutorial for BSCS 3rd Semester
Structural Models
Structural models represent the static aspects of a system. They describe classes, objects,
attributes, and relationships.
Example Class Diagram (Text-Based):
+----------------+ 1 * +----------------+
| Library |----------------------| Book |
+----------------+ +----------------+
| name | | title |
| address | | author |
+----------------+ | ISBN |
| isIssued |
+----------------+
| 0..1
+----------------+
| Member |
+----------------+
| name |
| memberID |
+----------------+
Behavioral Models
Behavioral models describe how the system behaves over time.
Example Sequence Diagram:
Member → Librarian → System → Book
requestBorrow()
checkAvailability()
issueBook()
markIssued()
Model-Driven Engineering
MDE uses models as the primary development artifacts.
Example:
UML Class Model → Auto-Generated Java Class
Class Student { name, rollNo, department }
Architectural Design
Architectural design defines the overall system structure.
Layered Architecture Diagram:
+-------------------------+
| Presentation Layer |
+-------------------------+
| Business Logic Layer |
+-------------------------+
| Data Access Layer |
+-------------------------+
| Database Layer |
+-------------------------+
Design and Implementation
Design converts requirements into technical specifications.
Flowchart (Text-Based):
Start → Input Marks → Check Conditions → Output Grade
C++ Example:
if (marks >= 85) grade = 'A';
Practice Questions with Answers
Q1: Define structural models with an example.
A1: Structural models show static structure, e.g., UML class diagrams showing classes and
relationships.
Q2: What is the purpose of behavioral models?
A2: Behavioral models describe system behavior such as workflows, state changes, and
interactions.
Q3: Explain Model-Driven Engineering.
A3: MDE uses high-level models from which code is automatically generated.
Q4: Draw and explain any software architecture style.
A4: Layered architecture shows separation of presentation, business logic, data access, and
storage layers.
Q5: Explain the difference between design and implementation.
A5: Design defines system structure and algorithms; implementation writes the actual code.