Tool (lab manual): Dia Diagram Editor. Every diagram below has a ready .dia file: download, open in Dia (File > Open), change names if needed, File > Export > PNG for the journal. Not installed: sudo apt install dia. Project used: Office Management System (OMS).

SE5 Class diagram and Use case diagram

  1. Open Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below
  2. Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below
  3. Use case: sheet UML > Actor (stick man) > click on page; double-click it > Text = Employee. Add Manager, Admin
  4. UML > Use case (oval) > click > double-click > Text = Mark Attendance ... (8 ovals)
  5. System boundary: top toolbox Box (rectangle) tool > drag around the ovals; title with the T (Text) tool
  6. Actor-to-oval: top toolbox Line tool > drag from actor to oval (ends turn red = connected)
  7. include: UML > Dependency (dashed arrow) > drag from Apply Leave to Login > double-click > Stereotype = include
  8. Class: UML > Class > click; double-click > Class tab: Class name. Attributes tab > New: name, type, Visibility Private
  9. Operations tab > New: name, type, Visibility Public (add parameters below). Apply
  10. Inheritance: UML > Generalization > drag FROM parent (Employee) TO child (Manager): hollow triangle sits at parent
  11. Association: UML > Association > drag Employee to LeaveRequest > double-click > Name applies, Multiplicity A 1, B *
  12. Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save
Office Management SystemMark AttendanceApply LeaveBook Meeting RoomView DirectoryLoginApprove / Reject LeaveManage InventoryGenerate PayrollEmployeeManagerAdmin<<include>><<include>><<include>>
Use case diagram (Dia)
Employee-empId: int-name: String-email: String-department: String+login(): bool+applyLeave(days:int): void+markAttendance(): voidManager+approveLeave(r:LeaveRequest): voidAdmin+generatePayroll(): void+updateInventory(): voidLeaveRequest-leaveId: int-fromDate: Date-toDate: Date-status: String+submit(): voidAttendance-date: Date-inTime: Time-outTime: TimePayroll-month: String-netSalary: double+calculate(): doubleInventoryItem-itemId: int-name: String-quantity: intapplies1*has1*receives1*manages1*
Class diagram (Dia)
Dia files (open in Dia: File > Open): usecase.diaclassd.dia
Use case diagram in Dia software: open on YouTube
UML class diagrams in Dia: open on YouTube

Viva

What is UML?Unified Modeling Language: standard diagrams to design software.
Use case diagram shows?What the system does for each user (actor): functional requirements.
include vs extend?include = always happens (Apply Leave includes Login); extend = optional / sometimes happens.
Class diagram shows?Static structure: classes, attributes, methods and relationships.
Relationships in class diagram?Association, aggregation (hollow diamond), composition (filled diamond), inheritance (hollow triangle), dependency (dashed).

SE6 DFD (Data Flow Diagram) Level 0 and Level 1

  1. Open Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below
  2. Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below
  3. Sheet Flowchart > Ellipse = process: draw, make it a circle, double-click > text 0.0 Office Management System
  4. Flowchart > Box = external entity (Employee, Manager, Admin)
  5. Sheet Gane and Sarson > Data Store = data store (D1 Employee DB ...) - only in Level 1
  6. Arrows: top toolbox Line tool; set the end arrow in the bottom-left arrow selector (or double-click line > End arrow)
  7. Label every arrow with the T (Text) tool: login, leave request, payslip ...
  8. Level 0 = one circle only. Level 1 = processes 1.0 to 5.0 + data stores. No arrow entity-to-entity or store-to-store
  9. Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save
0.0OfficeManagementSystemEmployeeManagerAdminlogin, attendance,leave requestleave status, payslipapprove / rejectpending requestsinventory,payroll datareports
DFD Level 0 (Dia)
EmployeeManagerAdmin1.0Login2.0Attendance3.0LeaveMgmt4.0Payroll5.0InventoryEmployee DBD1Attendance DBD2Leave DBD3Inventory DBD4Attendance DBD2credentialsverifyin / out timestoreleave formstatussave requestdecisionworking dayspayslipstock updatesave
DFD Level 1 (Dia)
Dia files (open in Dia: File > Open): dfd0.diadfd1.dia
Level 1 DFD in draw.io step by step: open on YouTube
Level 0, 1, 2 DFD solved example (Hindi): open on YouTube

Viva

What is DFD?Diagram showing how data moves through a system: inputs, processes, stores, outputs.
DFD symbols?Circle = process, rectangle = external entity, open rectangle = data store, arrow = data flow.
Level 0 vs Level 1?Level 0 = whole system as one process (context). Level 1 = system broken into main sub-processes.
DFD vs flowchart?DFD shows data movement; flowchart shows control / order of steps.
Rules?Data must go through a process; every flow labelled; balance inputs/outputs between levels.

SE7 Activity diagram and State transition diagram

  1. Open Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below
  2. Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below (UML)
  3. Start: UML > State Term (black dot). End: State Term > double-click > tick Is final (bullseye)
  4. Action: UML > Activity (rounded box) > double-click > text. Decision: UML > Branch (diamond)
  5. Parallel work (if asked): UML > Fork (black bar)
  6. Arrows: UML > Transition (or Line tool with end arrow). Double-click Transition > Guard = Yes / No
  7. State diagram: UML > State (rounded box: Draft, Submitted ...), Transition > Trigger = submit(), approve() ...
  8. Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save
Employee logs inFill leave formbalance enough?Show 'Insufficient balance'Submit requestManager reviews requestapproved?Update balance, notify ApprovedNotify Rejected[No][Yes][Yes][No]
Activity diagram: Apply Leave (Dia)
DraftSubmittedUnder ReviewApprovedRejectedClosedCancelledsubmit()manager opensemployee cancelsapprove()reject()leave taken
State diagram: Leave Request (Dia)
Dia files (open in Dia: File > Open): activity.diastate.dia
Activity diagram in Dia software: open on YouTube

Viva

Activity diagram shows?Flow of actions / workflow of a process (like a flowchart in UML).
State diagram shows?Different states of ONE object and the events that change its state.
Fork and join?Fork splits into parallel activities; join waits for all to finish.
Swimlanes?Columns showing which actor does which activity.
Activity vs state?Activity = steps of a process; state = life cycle of an object.

SE10 Test cases using white box testing

  1. Write the function (test_leave.py below) and number each statement / decision: nodes 1 to 9
  2. Draw the flow graph in Dia: sheet Flowchart > Ellipse (small circles 1-9), Line tool with end arrow, T tool for yes / no
  3. Count: E = 11 edges, N = 9 nodes > V(G) = E - N + 2 = 4 (= 3 decisions + 1 = 4 regions)
  4. 4 independent paths: 1-2-3-9 | 1-2-4-5-9 | 1-2-4-6-7-9 | 1-2-4-6-8-9
  5. One test case per path (table), run: python3 test_leave.py > all PASS
  6. Journal table: Test ID | Path | Input | Expected | Actual | Pass/Fail
123456789yesnoyesnoyesno1 read balance, days2 if days <= 0 ?3 return Invalid4 if days > balance ?5 return Rejected6 if days > 5 ?7 return Needs Manager Approval8 return Approved9 endE = 11, N = 9V(G) = E - N + 2 = 4= decisions + 1 = 3 + 1 = 4
Control flow graph with node list (Dia)
Dia files (open in Dia: File > Open): cfg.dia
Test IDPathInput (balance, days)ExpectedResult
TC11-2-3-910, 0InvalidPass
TC21-2-4-5-93, 5RejectedPass
TC31-2-4-6-7-910, 7Needs Manager ApprovalPass
TC41-2-4-6-8-910, 2ApprovedPass
test_leave.py
# Exp 10: function under test + white-box test cases (run: python3 test_leave.py)
def leave_status(balance, days):
    if days <= 0:                      # decision 1
        return "Invalid"
    elif days > balance:               # decision 2
        return "Rejected"
    elif days > 5:                     # decision 3
        return "Needs Manager Approval"
    else:
        return "Approved"

# one test per independent path (V(G) = 3 decisions + 1 = 4)
tests = [
    ("TC1", 10, 0, "Invalid"),
    ("TC2", 3, 5, "Rejected"),
    ("TC3", 10, 7, "Needs Manager Approval"),
    ("TC4", 10, 2, "Approved"),
]
for tc, bal, d, expected in tests:
    actual = leave_status(bal, d)
    print(tc, "balance =", bal, "days =", d, "| expected:", expected,
          "| actual:", actual, "|", "PASS" if actual == expected else "FAIL")
Basis path testing: cyclomatic complexity: open on YouTube
3 methods to find cyclomatic complexity: open on YouTube

Viva

White box vs black box?White box: tester sees the code (paths, branches). Black box: only inputs/outputs, no code.
Cyclomatic complexity?Number of independent paths = E - N + 2 = decisions + 1.
Coverage types?Statement, branch (decision), path coverage.
What is a test case?Input + expected output + steps to check one behaviour.
Levels of testing?Unit, integration, system, acceptance.

SE4 Cost estimation using metrics (COCOMO, Function Points)

  1. Pick size: OMS = 12 KLOC, organic (small team, known problem)
  2. Effort E = a x KLOC^b, Duration D = c x E^d, People = E / D, Cost = E x salary per month
  3. Run cost.py (box) to calculate, or do it on paper with the table
  4. Function Points: count EI, EO, EQ, ILF, EIF x weights = UFP; FP = UFP x (0.65 + 0.01 x sum Fi)
Modeabcd
Organic2.41.052.50.38
Semi-detached3.01.122.50.35
Embedded3.61.202.50.32
OMS example (12 KLOC, organic)Value
Effort E = 2.4 x 12^1.0532.6 person-months
Duration D = 2.5 x 32.6^0.389.4 months
People = E / D3.5 (~4 people)
Cost at Rs 50,000 / PMRs 16.3 lakh
FP: EI 6x4 + EO 4x5 + EQ 3x4 + ILF 5x10 + EIF 1x7UFP 113, VAF 1.00, FP 113
cost.py
# Exp 4: Basic COCOMO + Function Point calculator (run: python3 cost.py)
MODES = {"organic": (2.4, 1.05, 2.5, 0.38), "semi-detached": (3.0, 1.12, 2.5, 0.35),
         "embedded": (3.6, 1.20, 2.5, 0.32)}

kloc = float(input("Enter size in KLOC (e.g. 12): "))
mode = input("Mode (organic / semi-detached / embedded): ").strip().lower() or "organic"
cost_pm = float(input("Cost per person-month in Rs (e.g. 50000): "))

a, b, c, d = MODES[mode]
effort = a * kloc ** b            # person-months
time = c * effort ** d            # months
people = effort / time
print(f"Effort   E = {a} x {kloc}^{b} = {effort:.2f} person-months")
print(f"Duration D = {c} x {effort:.2f}^{d} = {time:.2f} months")
print(f"Staff    P = E / D = {people:.2f} people")
print(f"Cost       = {effort:.2f} x {cost_pm:.0f} = Rs {effort * cost_pm:,.0f}")

# Function points (average weights)
counts = {"EI": 6, "EO": 4, "EQ": 3, "ILF": 5, "EIF": 1}
weights = {"EI": 4, "EO": 5, "EQ": 4, "ILF": 10, "EIF": 7}
ufp = sum(counts[k] * weights[k] for k in counts)
fi_sum = 35                       # 14 factors rated 0-5, total
fp = ufp * (0.65 + 0.01 * fi_sum)
print(f"UFP = {ufp}, VAF = {0.65 + 0.01 * fi_sum:.2f}, FP = {fp:.1f}")
COCOMO model explained with numericals: open on YouTube
Function point step by step with numerical: open on YouTube

Viva

What is COCOMO?Constructive Cost Model (Boehm): estimates effort, time and people from size (KLOC).
3 modes?Organic (small, simple), semi-detached (medium), embedded (complex, strict constraints).
What is a function point?Size measure based on functionality: inputs, outputs, inquiries, internal files, external files.
LOC vs FP?LOC depends on language and is known late; FP is language independent and known early.
What are metrics?Measurements of the product / process (size, effort, defects) used for estimation and quality.

SE9 Version control using Git and GitHub

  1. Terminal: git --version (if missing: sudo apt install -y git)
  2. Set name / email once, then init, add, commit (box)
  3. Make a branch, commit there, merge back to main
  4. On github.com: New repository 'oms' > copy URL > git remote add origin URL > git push (login with token)
  5. Screenshot: git log --oneline and the GitHub repo page
Commands (run one by one)
git --version
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

mkdir oms && cd oms
git init
echo "# Office Management System" > README.md
git add .
git commit -m "Initial commit"
git status
git log --oneline

git branch feature-login
git checkout feature-login
echo "login module" > login.txt
git add login.txt
git commit -m "Add login module"
git checkout main          # (or master)
git merge feature-login

git remote add origin https://github.com/<username>/oms.git
git branch -M main
git push -u origin main
Git tutorial for beginners: open on YouTube
Push your first project to GitHub: open on YouTube

Viva

What is version control?System that records every change to files so you can go back, compare and work in teams.
Git vs GitHub?Git = version control tool on your PC; GitHub = website that hosts Git repositories online.
commit?A saved snapshot of changes with a message.
branch and merge?Branch = separate line of work; merge = join branch changes back to main.
push vs pull?push = upload commits to remote; pull = download + merge remote changes.
Centralized vs distributed?Centralized (SVN): one server copy. Distributed (Git): every user has the full history.

SE3 Project plan using a project management tool (Gantt chart)

  1. Open GanttProject (or ProjectLibre). If not installed: use mermaid.live with the Gantt box
  2. Project > New > name 'Office Management System', start date
  3. Add tasks from the table (Ctrl+T), set duration in days
  4. Link tasks: select two tasks > Link (finish-to-start). Add milestone 'Deployment'
  5. Resources tab: add team members, assign to tasks. Export chart as PNG
Gantt chart: OMS project
TaskDurationDepends on
Requirement gathering7 days-
SRS document5 daysRequirements
System design (UML, DFD)10 daysSRS
Increment 1: Login + Directory10 daysDesign
Increment 2: Attendance + Leave12 daysInc 1
Increment 3: Payroll + Inventory12 daysInc 2
Testing8 daysInc 3
Deployment (milestone)0Testing
Gantt (Mermaid)
gantt
  title OMS project plan
  dateFormat YYYY-MM-DD
  section Analysis
  Requirement gathering      :a1, 2026-07-14, 7d
  SRS document               :a2, after a1, 5d
  section Design
  UML and DFD                :d1, after a2, 10d
  section Development
  Inc 1 Login + Directory    :i1, after d1, 10d
  Inc 2 Attendance + Leave   :i2, after i1, 12d
  Inc 3 Payroll + Inventory  :i3, after i2, 12d
  section Release
  Testing                    :t1, after i3, 8d
  Deployment                 :milestone, after t1, 0d
GanttProject: create Gantt chart in 10 minutes: open on YouTube

Viva

What is a Gantt chart?Bar chart of tasks against time showing start, end and dependencies.
What is a milestone?Important point with zero duration (e.g. deployment).
Critical path?Longest chain of dependent tasks; any delay delays the whole project.
WBS?Work Breakdown Structure: project split into smaller tasks.
PERT vs CPM?PERT uses 3 time estimates (uncertain); CPM uses fixed time, focuses on critical path.

SE2 SRS document in IEEE format

  1. Write the headings below in order (IEEE 830)
  2. Fill each with 2-4 lines for your project (OMS example given)
  3. Functional requirements numbered FR1, FR2 ...; non-functional NFR1 ...
IEEE SRS outline + OMS sample
1. Introduction
  1.1 Purpose      : SRS for Office Management System (OMS) v1.0
  1.2 Scope        : web app for attendance, leave, payroll, inventory, room booking
  1.3 Definitions  : OMS, HR, PM, SRS
  1.4 References   : IEEE 830-1998
  1.5 Overview     : rest of this document
2. Overall Description
  2.1 Product perspective : new standalone web system replacing spreadsheets
  2.2 Product functions   : login, attendance, leave, payroll, inventory, directory
  2.3 User classes        : Employee, Manager, Admin
  2.4 Operating environment: browser, Ubuntu/Windows server, MySQL
  2.5 Constraints         : 150 users, must run on office LAN
  2.6 Assumptions         : every employee has a login
3. Specific Requirements
  3.1 Functional
      FR1 User shall log in with email and password
      FR2 Employee shall mark attendance (in / out time)
      FR3 Employee shall apply for leave; manager approves / rejects
      FR4 Admin shall generate monthly payroll
      FR5 Admin shall update inventory stock
  3.2 Non-functional
      NFR1 Performance : page loads in < 2 s for 150 users
      NFR2 Security    : passwords hashed, role-based access
      NFR3 Availability: 99% during office hours
      NFR4 Usability   : new user learns in < 30 min
  3.3 External interfaces : web UI, email (SMTP) notifications
4. Appendices
SRS document: characteristics and IEEE standard: open on YouTube

Viva

What is SRS?Software Requirements Specification: document listing everything the software must do.
Functional vs non-functional?Functional = what the system does (apply leave). Non-functional = how well (speed, security).
Characteristics of good SRS?Correct, complete, unambiguous, consistent, verifiable, modifiable, traceable.
Which IEEE standard?IEEE 830 (now ISO/IEC/IEEE 29148).
Who uses SRS?Client, developers, testers, project manager.

SE8 RMMM plan (Risk Mitigation, Monitoring, Management)

  1. List 4-5 risks of your project
  2. For each: probability, impact, mitigation (avoid), monitoring (watch), management (if it happens)
  3. Risk exposure RE = Probability x Cost of impact
RiskProb.ImpactMitigationMonitoringManagement
R1 Key developer leaves30%HighShare knowledge, documentationTrack team morale / attendanceReassign work, hire replacement
R2 Requirements keep changing60%MediumSign SRS, change-control processCount change requests per weekPush to next increment
R3 Data loss / security breach20%CriticalDaily backups, encryption, access rolesAudit logs, backup checksRestore backup, reset passwords
R4 Schedule delay40%HighBuffer time, incremental deliveryGantt chart progress weeklyAdd people, cut low-priority features
R5 Payroll calculation errors25%HighUnit tests, HR reviewCompare with manual sampleFix and re-run payroll
RMMM (Risk mitigation, monitoring and management): open on YouTube

Viva

What is risk?A possible future problem that may affect the project.
RMMM?Mitigation = reduce chance; Monitoring = watch for signs; Management = action plan if it happens.
Types of risk?Project, technical, business risks (also known / predictable / unpredictable).
Risk exposure?RE = probability x cost of loss.
Proactive vs reactive?Proactive plans before risk occurs; reactive acts after it happens.

SE1 DSP (Detailed Statement of Problem) and process model

  1. Write: Title, Problem statement, Objectives, Scope, Users, Challenges
  2. Choose a process model and justify (OMS = Incremental)
  3. Draw the model and list increments
  4. Draw the model in Dia: sheet Flowchart > Box for each phase, Line tool with end arrow, T tool for labels
Increment 1: Login + DirectoryRequirementsDesignCodeTestDeliverIncrement 2: Attendance + LeaveRequirementsDesignCodeTestDeliverIncrement 3: Payroll + InventoryRequirementsDesignCodeTestDeliverEach increment adds working features; customer feedback goes into the next increment.
Incremental model for OMS (Dia)
Dia files (open in Dia: File > Open): incremental.dia
ModelWhen to use
WaterfallRequirements fixed and clear, small project
IncrementalModules can be delivered in parts, early delivery needed
SpiralLarge, high-risk projects (risk analysis each loop)
Agile / ScrumRequirements change often, client available
V-modelTesting planned for every phase, safety-critical
PrototypeRequirements unclear, build a sample first
DSP template (OMS)
Title     : Office Management System (OMS)
Problem   : 150-employee office uses paper logs, spreadsheets and email for attendance,
            leave, payroll and inventory -> data loss, delays, 15 man-hours/week wasted.
Objectives: automate attendance, leave approval, payroll, inventory, room booking.
Scope     : web app for Employees, Managers, Admin inside the office.
Users     : Employee, Manager, Admin
Model     : Incremental - modules are independent, deliver the most needed first,
            early feedback, lower risk, no big-bang change.
Incremental model: example, advantages and disadvantages: open on YouTube

Viva

What is SDLC?Software Development Life Cycle: requirements, design, coding, testing, deployment, maintenance.
Why incremental for OMS?Independent modules; deliver login + directory first, then others; early feedback.
Waterfall drawback?No going back; client sees product only at the end.
Spiral model?Iterative with risk analysis in every loop (Boehm).
Agile?Short sprints, working software often, welcomes changing requirements.

VIVA general SE questions

What is software engineering?Systematic, disciplined approach to develop, operate and maintain software.
SDLC phases?Requirement analysis, design, implementation (coding), testing, deployment, maintenance.
Process models?Waterfall, Incremental, Spiral, Prototype, V-model, Agile (Scrum).
Verification vs validation?Verification: are we building the product right (reviews). Validation: are we building the right product (testing with user).
Cohesion vs coupling?Cohesion = how related things inside a module are (want HIGH). Coupling = dependency between modules (want LOW).
Feasibility study types?Technical, economic, operational, schedule, legal.
Requirement elicitation techniques?Interviews, questionnaires, observation, brainstorming, use cases, prototyping.
Types of UML diagrams?Structural: class, object, component, deployment. Behavioural: use case, activity, state, sequence, collaboration.
Black box testing techniques?Equivalence partitioning, boundary value analysis, decision table.
Alpha vs beta testing?Alpha: by users at developer site. Beta: by real users at their own site.
Regression testing?Re-testing old features after a change to make sure nothing broke.
SCM?Software Configuration Management: track and control changes (version control, baselines, change control).
SQA?Software Quality Assurance: activities that make sure the process and product meet quality standards.
Maintenance types?Corrective (fix bugs), adaptive (new environment), perfective (improve), preventive.
Agile / Scrum terms?Sprint (1-4 weeks), product backlog, scrum master, daily stand-up.