SE LAB se5 se6 se7 se10 se4 se9 se3 se2 se8 se1 viva cn 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 diagramOpen Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below Use case: sheet UML > Actor (stick man) > click on page; double-click it > Text = Employee. Add Manager, Admin UML > Use case (oval) > click > double-click > Text = Mark Attendance ... (8 ovals) System boundary: top toolbox Box (rectangle) tool > drag around the ovals; title with the T (Text) tool Actor-to-oval: top toolbox Line tool > drag from actor to oval (ends turn red = connected) include: UML > Dependency (dashed arrow) > drag from Apply Leave to Login > double-click > Stereotype = include Class: UML > Class > click; double-click > Class tab: Class name. Attributes tab > New: name, type, Visibility Private Operations tab > New: name, type, Visibility Public (add parameters below). Apply Inheritance: UML > Generalization > drag FROM parent (Employee) TO child (Manager): hollow triangle sits at parent Association: UML > Association > drag Employee to LeaveRequest > double-click > Name applies, Multiplicity A 1, B * Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save Office Management System Mark Attendance Apply Leave Book Meeting Room View Directory Login Approve / Reject Leave Manage Inventory Generate Payroll Employee Manager Admin <<include>> <<include>> <<include>> Use case diagram (Dia)
Employee -empId: int -name: String -email: String -department: String +login(): bool +applyLeave(days:int): void +markAttendance(): void Manager +approveLeave(r:LeaveRequest): void Admin +generatePayroll(): void +updateInventory(): void LeaveRequest -leaveId: int -fromDate: Date -toDate: Date -status: String +submit(): void Attendance -date: Date -inTime: Time -outTime: Time Payroll -month: String -netSalary: double +calculate(): double InventoryItem -itemId: int -name: String -quantity: int applies 1 * has 1 * receives 1 * manages 1 * Class diagram (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 1Open Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below Sheet Flowchart > Ellipse = process: draw, make it a circle, double-click > text 0.0 Office Management System Flowchart > Box = external entity (Employee, Manager, Admin) Sheet Gane and Sarson > Data Store = data store (D1 Employee DB ...) - only in Level 1 Arrows: top toolbox Line tool; set the end arrow in the bottom-left arrow selector (or double-click line > End arrow) Label every arrow with the T (Text) tool: login, leave request, payslip ... Level 0 = one circle only. Level 1 = processes 1.0 to 5.0 + data stores. No arrow entity-to-entity or store-to-store Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save 0.0 Office Management System Employee Manager Admin login, attendance, leave request leave status, payslip approve / reject pending requests inventory, payroll data reports DFD Level 0 (Dia)
Employee Manager Admin 1.0 Login 2.0 Attendance 3.0 Leave Mgmt 4.0 Payroll 5.0 Inventory Employee DB D1 Attendance DB D2 Leave DB D3 Inventory DB D4 Attendance DB D2 credentials verify in / out time store leave form status save request decision working days payslip stock update save DFD Level 1 (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 diagramOpen Dia (Ubuntu: Activities > type Dia; if missing: sudo apt install dia). Ready file: File > Open > the .dia file below Left panel, under the tool icons: click the sheet drop-down (shows Assorted / Flowchart) and pick the sheet named below (UML) Start: UML > State Term (black dot). End: State Term > double-click > tick Is final (bullseye) Action: UML > Activity (rounded box) > double-click > text. Decision: UML > Branch (diamond) Parallel work (if asked): UML > Fork (black bar) Arrows: UML > Transition (or Line tool with end arrow). Double-click Transition > Guard = Yes / No State diagram: UML > State (rounded box: Draft, Submitted ...), Transition > Trigger = submit(), approve() ... Save: File > Save (.dia). Picture for journal: File > Export > choose PNG > Save Employee logs in Fill leave form balance enough? Show 'Insufficient balance' Submit request Manager reviews request approved? Update balance, notify Approved Notify Rejected [No] [Yes] [Yes] [No] Activity diagram: Apply Leave (Dia)
Draft Submitted Under Review Approved Rejected Closed Cancelled submit() manager opens employee cancels approve() reject() leave taken State diagram: Leave Request (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 testingWrite the function (test_leave.py below) and number each statement / decision: nodes 1 to 9 Draw the flow graph in Dia: sheet Flowchart > Ellipse (small circles 1-9), Line tool with end arrow, T tool for yes / no Count: E = 11 edges, N = 9 nodes > V(G) = E - N + 2 = 4 (= 3 decisions + 1 = 4 regions) 4 independent paths: 1-2-3-9 | 1-2-4-5-9 | 1-2-4-6-7-9 | 1-2-4-6-8-9 One test case per path (table), run: python3 test_leave.py > all PASS Journal table: Test ID | Path | Input | Expected | Actual | Pass/Fail 1 2 3 4 5 6 7 8 9 yes no yes no yes no 1 read balance, days 2 if days <= 0 ? 3 return Invalid 4 if days > balance ? 5 return Rejected 6 if days > 5 ? 7 return Needs Manager Approval 8 return Approved 9 end E = 11, N = 9 V(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 ID Path Input (balance, days) Expected Result TC1 1-2-3-9 10, 0 Invalid Pass TC2 1-2-4-5-9 3, 5 Rejected Pass TC3 1-2-4-6-7-9 10, 7 Needs Manager Approval Pass TC4 1-2-4-6-8-9 10, 2 Approved Pass
test_leave.pycopy
# 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)Pick size: OMS = 12 KLOC, organic (small team, known problem) Effort E = a x KLOC^b, Duration D = c x E^d, People = E / D, Cost = E x salary per month Run cost.py (box) to calculate, or do it on paper with the table Function Points: count EI, EO, EQ, ILF, EIF x weights = UFP; FP = UFP x (0.65 + 0.01 x sum Fi) Mode a b c d 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
OMS example (12 KLOC, organic) Value Effort E = 2.4 x 12^1.05 32.6 person-months Duration D = 2.5 x 32.6^0.38 9.4 months People = E / D 3.5 (~4 people) Cost at Rs 50,000 / PM Rs 16.3 lakh FP: EI 6x4 + EO 4x5 + EQ 3x4 + ILF 5x10 + EIF 1x7 UFP 113, VAF 1.00, FP 113
cost.pycopy
# 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 GitHubTerminal: git --version (if missing: sudo apt install -y git) Set name / email once, then init, add, commit (box) Make a branch, commit there, merge back to main On github.com: New repository 'oms' > copy URL > git remote add origin URL > git push (login with token) Screenshot: git log --oneline and the GitHub repo page Commands (run one by one)copy
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)Open GanttProject (or ProjectLibre). If not installed: use mermaid.live with the Gantt box Project > New > name 'Office Management System', start date Add tasks from the table (Ctrl+T), set duration in days Link tasks: select two tasks > Link (finish-to-start). Add milestone 'Deployment' Resources tab: add team members, assign to tasks. Export chart as PNG Task Duration Depends on Requirement gathering 7 days - SRS document 5 days Requirements System design (UML, DFD) 10 days SRS Increment 1: Login + Directory 10 days Design Increment 2: Attendance + Leave 12 days Inc 1 Increment 3: Payroll + Inventory 12 days Inc 2 Testing 8 days Inc 3 Deployment (milestone) 0 Testing
Gantt (Mermaid)copy
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 formatWrite the headings below in order (IEEE 830) Fill each with 2-4 lines for your project (OMS example given) Functional requirements numbered FR1, FR2 ...; non-functional NFR1 ... IEEE SRS outline + OMS samplecopy
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)List 4-5 risks of your project For each: probability, impact, mitigation (avoid), monitoring (watch), management (if it happens) Risk exposure RE = Probability x Cost of impact Risk Prob. Impact Mitigation Monitoring Management R1 Key developer leaves 30% High Share knowledge, documentation Track team morale / attendance Reassign work, hire replacement R2 Requirements keep changing 60% Medium Sign SRS, change-control process Count change requests per week Push to next increment R3 Data loss / security breach 20% Critical Daily backups, encryption, access roles Audit logs, backup checks Restore backup, reset passwords R4 Schedule delay 40% High Buffer time, incremental delivery Gantt chart progress weekly Add people, cut low-priority features R5 Payroll calculation errors 25% High Unit tests, HR review Compare with manual sample Fix 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 modelWrite: Title, Problem statement, Objectives, Scope, Users, Challenges Choose a process model and justify (OMS = Incremental) Draw the model and list increments Draw the model in Dia: sheet Flowchart > Box for each phase, Line tool with end arrow, T tool for labels Increment 1: Login + Directory Requirements Design Code Test Deliver Increment 2: Attendance + Leave Requirements Design Code Test Deliver Increment 3: Payroll + Inventory Requirements Design Code Test Deliver Each increment adds working features; customer feedback goes into the next increment. Incremental model for OMS (Dia)
Model When to use Waterfall Requirements fixed and clear, small project Incremental Modules can be delivered in parts, early delivery needed Spiral Large, high-risk projects (risk analysis each loop) Agile / Scrum Requirements change often, client available V-model Testing planned for every phase, safety-critical Prototype Requirements unclear, build a sample first
DSP template (OMS)copy
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 questionsWhat 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.