Software Engineering Practical Exam — Complete Reference
1. COCOMO (Full Practical)
Question Types
- Numerical (Effort, Duration, Team, Cost)
- Java Program
- Excel Sheet
E = a × (KLOC)^b → Effort (Person-Months)
D = c × (E)^d → Duration (Months)
P = E / D → Team Size (Persons)
Productivity = KLOC / E → Productivity (KLOC per PM)
Cost = E × Cost_per_PM → Total Cost (₹)
Constant Table
| Mode |
a |
b |
c |
d |
| Organic |
2.4 |
1.05 |
2.5 |
0.38 |
| Semi |
3.0 |
1.12 |
2.5 |
0.35 |
| Embedded |
3.6 |
1.20 |
2.5 |
0.32 |
How to pick mode:
- Organic → Small team, familiar project, < 50 KLOC (e.g. payroll system)
- Semi-Detached → Medium team, mixed experience, 50–300 KLOC (e.g. banking system)
- Embedded → Tight constraints, real-time, > 300 KLOC (e.g. air traffic control)
Step-by-Step Solution (Numerical)
- Step 1: Identify KLOC and Mode
- Step 2: Pick constants (a, b, c, d)
- Step 3: Calculate Effort
- First compute
(KLOC)^b using calculator
- Multiply with
a
- Step 4: Calculate Duration
- Compute
(Effort)^d
- Multiply with
c
- Step 5: Team Size
- Step 6: Productivity
- Step 7: Cost (if given)
- Multiply
Effort × Cost_per_PM
Worked Example
Q: A project has 32 KLOC, Organic mode. Cost per PM = ₹15,000. Find E, D, P, Productivity, Cost.
Step 1: KLOC = 32, Mode = Organic
Step 2: a=2.4, b=1.05, c=2.5, d=0.38
Step 3: E = 2.4 × (32)^1.05
(32)^1.05 = 32 × 32^0.05 = 32 × 1.1892 ≈ 38.05
E = 2.4 × 38.05 = 91.33 PM
Step 4: D = 2.5 × (91.33)^0.38
(91.33)^0.38 ≈ 5.65
D = 2.5 × 5.65 = 14.13 months
Step 5: P = 91.33 / 14.13 = 6.46 ≈ 7 persons
Step 6: Productivity = 32 / 91.33 = 0.35 KLOC/PM
Step 7: Cost = 91.33 × 15000 = ₹13,69,950
Excel (Full Step-by-Step — Do Exactly)
Step 1: Open Excel
Step 2: Create columns in row 1:
| A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
| KLOC |
a |
b |
c |
d |
Effort |
Duration |
Team |
Productivity |
Cost |
Step 3: Enter data:
A2 → KLOC value (e.g. 32)
B2 → a (e.g. 2.4)
C2 → b (e.g. 1.05)
D2 → c (e.g. 2.5)
E2 → d (e.g. 0.38)
Step 4: Click F2 → type:
= B2 * (A2 ^ C2)
Step 5: Click G2 → type:
= D2 * (F2 ^ E2)
Step 6: Click H2 → type:
= F2 / G2
Step 7: Click I2 → type:
= A2 / F2
Step 8: Click J2 → type:
= F2 * 15000
Excel Tips:
- Press
Enter after each formula to confirm
- Use
Ctrl+S to save
- If you see
#VALUE! → check cell references
- To format decimals → Right click → Format Cells → Number → 2 decimal places
- To do multiple modes at once, fill rows 2, 3, 4 with Organic, Semi, Embedded constants and drag formulas down
Java Code (Full)
import java.util.*;
public class COCOMO {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("Enter type (1=Organic, 2=Semi, 3=Embedded):");
int type = sc.nextInt();
System.out.println("Enter KLOC:");
double kloc = sc.nextDouble();
System.out.println("Enter cost per PM:");
double cost = sc.nextDouble();
double a=0, b=0, c=2.5, d=0;
if(type==1) { a=2.4; b=1.05; d=0.38; }
else if(type==2) { a=3.0; b=1.12; d=0.35; }
else { a=3.6; b=1.20; d=0.32; }
double effort = a * Math.pow(kloc, b);
double duration = c * Math.pow(effort, d);
double team = effort / duration;
double productivity= kloc / effort;
double totalCost = effort * cost;
System.out.printf("Effort: %.2f PM%n", effort);
System.out.printf("Duration: %.2f months%n", duration);
System.out.printf("Team Size: %.2f persons%n", team);
System.out.printf("Productivity: %.4f KLOC/PM%n", productivity);
System.out.printf("Total Cost: Rs %.2f%n", totalCost);
}
}
Compile & Run:
javac COCOMO.java
java COCOMO
2. Function Point (FP — Full Practical)
Weight Table (MEMORIZE THIS)
| Parameter |
Low |
Average |
High |
| External Input (EI) |
3 |
4 |
6 |
| External Output (EO) |
4 |
5 |
7 |
| External Inquiry (EQ) |
3 |
4 |
6 |
| Internal Logical File (ILF) |
7 |
10 |
15 |
| External Interface File (EIF) |
5 |
7 |
10 |
Default: If question says "Average complexity", use the Average column.
Step-by-Step
- Step 1: Identify counts —
EI, EO, EQ, ILF, EIF
- Step 2: Choose weights (Default → Average column)
- Step 3: Multiply each —
EI × weight, EO × weight, ...
- Step 4: Add all → UFP (Unadjusted Function Points)
- Step 5: Find
ΣFi (sum of 14 General System Characteristics)
- If not given → assume
42
- Each characteristic rated 0–5
- Total range: 0 to 70
- Step 6: Compute VAF:
VAF = 0.65 + 0.01 × ΣFi
- Step 7: Compute FP:
FP = UFP × VAF
Worked Example
Q: EI=10, EO=8, EQ=6, ILF=4, EIF=3. Average complexity. ΣFi = 42. Find FP.
Step 1: Using Average weights:
EI = 10 × 4 = 40
EO = 8 × 5 = 40
EQ = 6 × 4 = 24
ILF = 4 × 10 = 40
EIF = 3 × 7 = 21
Step 2: UFP = 40 + 40 + 24 + 40 + 21 = 165
Step 3: VAF = 0.65 + 0.01 × 42 = 0.65 + 0.42 = 1.07
Step 4: FP = 165 × 1.07 = 176.55
14 General System Characteristics (GSC)
If asked in viva — these are the 14 factors:
- Data Communications
- Distributed Data Processing
- Performance
- Heavily Used Configuration
- Transaction Rate
- Online Data Entry
- End-User Efficiency
- Online Update
- Complex Processing
- Reusability
- Installation Ease
- Operational Ease
- Multiple Sites
- Facilitate Change
Excel (Step-by-Step)
Step 1: Create columns:
| A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
| EI |
EO |
EQ |
ILF |
EIF |
w_EI |
w_EO |
w_EQ |
w_ILF |
w_EIF |
UFP |
ΣFi |
VAF |
FP |
Step 2: Enter counts in row 2 (A2 to E2)
Step 3: Enter weights in F2 to J2 (e.g. 4, 5, 4, 10, 7 for average)
Step 4: UFP (K2):
= A2*F2 + B2*G2 + C2*H2 + D2*I2 + E2*J2
Step 5: ΣFi (L2) → enter 42 or given value
Step 6: VAF (M2):
= 0.65 + 0.01*L2
Step 7: FP (N2):
= K2 * M2
3. PERT (Full Practical)
Te = (O + 4M + P) / 6 → Expected Time
σ = (P - O) / 6 → Standard Deviation
V = σ² = ((P - O) / 6)² → Variance
Step-by-Step
- Step 1: Identify
O (Optimistic), M (Most Likely), P (Pessimistic)
- Step 2: Multiply
M by 4
- Step 3: Add all →
(O + 4M + P)
- Step 4: Divide by 6 →
Te
- Step 5: Standard Deviation:
σ = (P - O) / 6
- Step 6: Variance:
V = σ²
Worked Example
Q: O = 2, M = 5, P = 14. Find Te, σ, V.
Te = (2 + 4×5 + 14) / 6 = (2 + 20 + 14) / 6 = 36/6 = 6 weeks
σ = (14 - 2) / 6 = 12/6 = 2
V = 2² = 4
For multiple activities: Add all Te for critical path duration. Add all Variances (NOT σ).
Excel
Te:
=(A2 + 4*B2 + C2)/6
Standard Deviation:
=(C2-A2)/6
Variance:
=((C2-A2)/6)^2
Where A = O, B = M, C = P
4. CPM (Full Detailed)
Key Terms
| Term |
Full Form |
Meaning |
| ES |
Earliest Start |
Earliest an activity can start |
| EF |
Earliest Finish |
ES + Duration |
| LS |
Latest Start |
Latest it can start without delay |
| LF |
Latest Finish |
LS + Duration |
| Float/Slack |
— |
LS - ES (or LF - EF) |
Step-by-Step
- Step 1: Draw network diagram (activities as arrows or nodes)
- Step 2: Forward Pass (Left → Right):
- Start first activity
ES = 0
EF = ES + Duration
- If multiple predecessors →
ES = MAX(all predecessor EF)
- Step 3: Backward Pass (Right → Left):
- Last activity
LF = Project EF
LS = LF - Duration
- If multiple successors →
LF = MIN(all successor LS)
- Step 4: Float:
Float = LS - ES (or LF - EF)
- Step 5: Critical Path:
- Activities with
Float = 0
- Longest path through the network
Worked Example
Q: Activities: A(3), B(4), C(2), D(5). A→C, A→D, B→D. Find Critical Path.
Forward Pass:
A: ES=0, EF=3
B: ES=0, EF=4
C: ES=3 (after A), EF=5
D: ES=max(3,4)=4, EF=9
Project Duration = 9
Backward Pass:
D: LF=9, LS=4
C: LF=9, LS=7
B: LF=4, LS=0
A: LF=min(7,4)=4, LS=1
Float:
A: 1-0 = 1
B: 0-0 = 0 ✓
C: 7-3 = 4
D: 4-4 = 0 ✓
Critical Path: B → D (duration = 9)
| Activity |
Duration |
ES |
EF |
LS |
LF |
Float |
Critical? |
| A |
3 |
0 |
3 |
1 |
4 |
1 |
No |
| B |
4 |
0 |
4 |
0 |
4 |
0 |
✅ Yes |
| C |
2 |
3 |
5 |
7 |
9 |
4 |
No |
| D |
5 |
4 |
9 |
4 |
9 |
0 |
✅ Yes |
5. Burndown Chart (Excel — Full Detailed)
Step-by-Step
- Step 1: Create table:
| Day |
Planned (Remaining) |
Actual (Remaining) |
| 0 |
100 |
100 |
| 1 |
90 |
95 |
| 2 |
80 |
85 |
| ... |
... |
... |
- Step 2: Fill data (planned decreases linearly, actual varies)
- Step 3: Select all cells including headers
- Step 4: Click Insert → Line Chart → Line with Markers
- Step 5: Ensure:
- Two lines visible (Planned = straight, Actual = zigzag)
- X-axis = Day/Sprint
- Y-axis = Remaining Work (Story Points / Hours)
- Step 6: Add chart title: "Sprint Burndown Chart"
- Step 7: Add axis labels and legend
Excel Shortcut: Select data → press Alt+F1 for instant chart
Analysis (Write This)
| Observation |
Meaning |
Action |
| Actual > Planned |
Behind schedule |
Add resources or reduce scope |
| Actual < Planned |
Ahead of schedule |
Good progress |
| Flat line |
No work done |
Blocked or idle |
| End > 0 |
Incomplete sprint |
Carry over to next sprint |
| Gap increasing |
High risk |
Immediate intervention needed |
| Actual touches 0 |
Sprint complete |
All tasks done ✅ |
6. Gantt Chart (Excel — Full Detailed)
Step-by-Step
- Step 1: Create table:
| Task |
Start Date |
Duration (Days) |
| Requirements |
01/01/2025 |
5 |
| Design |
06/01/2025 |
7 |
| Coding |
13/01/2025 |
10 |
| Testing |
23/01/2025 |
5 |
| Deployment |
28/01/2025 |
3 |
- Step 2: Enter dates in proper format (
dd/mm/yyyy)
- Step 3: Select all data
- Step 4: Insert → Bar Chart → Stacked Bar
- Step 5: Right click chart → Select Data
- Step 6: Remove wrong series (keep only Start Date & Duration)
- Step 7: Add:
- Series 1: Start Date column
- Series 2: Duration column
- Step 8: Set Axis Labels → Task names
- Step 9: Click Start Date bars → Format Data Series → No Fill (makes them invisible)
- Step 10: Click vertical axis → Format Axis → Categories in Reverse Order ✓
- Step 11: Click horizontal axis → Format Axis → Minimum = first start date number
Key Fix: If dates show as numbers like 45000 → Right click axis → Format Axis → Number → Date
Troubleshoot
| Problem |
Cause |
Fix |
| Numbers like 45000 |
Wrong date format |
Format axis as Date |
| All bars start at 0 |
Start date not applied |
Redo Select Data |
| Tasks in wrong order |
Reverse not applied |
Check "Categories in Reverse Order" |
| Bars not visible |
Wrong series selected |
Check series in Select Data |
7. WBS (Word — Full Detailed)
Step-by-Step
- Step 1: Open Word
- Step 2: Click Insert → SmartArt
- Step 3: Choose Hierarchy → Organization Chart
- Step 4: Add levels:
- Level 1: Project Name (e.g. Hospital Management System)
- Level 2: Modules (e.g. Patient, Doctor, Billing, Admin)
- Level 3: Tasks (e.g. UI Design, Database, Testing)
- Step 5: Use
Tab to indent (demote) and Shift+Tab to promote
- Step 6: Resize for clarity
- Step 7: Change colors via SmartArt Design → Change Colors
Example WBS Structure
Hospital Management System
├── 1. Patient Module
│ ├── 1.1 Registration
│ ├── 1.2 Appointment Booking
│ └── 1.3 Medical History
├── 2. Doctor Module
│ ├── 2.1 Schedule Management
│ ├── 2.2 Patient Consultation
│ └── 2.3 Prescription
├── 3. Billing Module
│ ├── 3.1 Bill Generation
│ ├── 3.2 Insurance Processing
│ └── 3.3 Payment Gateway
└── 4. Admin Module
├── 4.1 User Management
├── 4.2 Reports
└── 4.3 System Config
WBS Rule: Each item must be a deliverable, NOT an action. Say "Registration Form" not "Create Registration".
8. JUnit (Full Practical + Template)
Common Annotations
| Annotation |
Purpose |
@Test |
Marks a test method |
@BeforeEach |
Runs before each test (setup) |
@AfterEach |
Runs after each test (cleanup) |
@BeforeAll |
Runs once before all tests (static) |
@AfterAll |
Runs once after all tests (static) |
@DisplayName |
Custom test name |
@Disabled |
Skip a test |
Common Assertions
assertEquals(expected, actual); // Check equality
assertNotEquals(a, b); // Check not equal
assertTrue(condition); // Check true
assertFalse(condition); // Check false
assertNull(obj); // Check null
assertNotNull(obj); // Check not null
assertThrows(Exception.class, () -> {}); // Check exception thrown
assertArrayEquals(arr1, arr2); // Check arrays equal
Template
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import static org.junit.jupiter.api.Assertions.*;
public class TestClass {
// Optional: setup before each test
@BeforeEach
void setup(){
// initialize objects
}
@Test
void testCase1(){
assertEquals(expected, actual);
}
@Test
void testCase2(){
assertTrue(condition);
}
@Test
void testException(){
assertThrows(IllegalArgumentException.class, () -> {
// code that should throw
});
}
}
Practical Scenario (Hospital Bill)
class Hospital {
double calculate(int days, double cost, double extra, boolean ins){
double total = days * cost + extra;
if(ins) total *= 0.8;
return total;
}
}
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import static org.junit.jupiter.api.Assertions.*;
public class TestHospital {
Hospital h;
@BeforeEach
void setup(){
h = new Hospital();
}
@Test
void normal(){
assertEquals(7000, h.calculate(5, 1000, 2000, false));
}
@Test
void insurance(){
assertEquals(5600, h.calculate(5, 1000, 2000, true));
}
@Test
void zeroDays(){
assertEquals(2000, h.calculate(0, 1000, 2000, false));
}
@Test
void negativeDays(){
// Edge case: negative days should still compute
assertEquals(-3000.0, h.calculate(-5, 1000, 2000, false));
}
@Test
void zeroExtraCost(){
assertEquals(5000, h.calculate(5, 1000, 0, false));
}
@Test
void insuranceWithZeroDays(){
assertEquals(1600, h.calculate(0, 1000, 2000, true));
}
}
Run JUnit:
javac -cp junit-platform-console-standalone.jar:. *.java
java -cp junit-platform-console-standalone.jar:. org.junit.platform.console.ConsoleLauncher --scan-classpath
9. Pytest (Full Practical + Template)
Common Assertions & Decorators
assert x == y # Equality
assert x != y # Not equal
assert x > y # Greater than
assert x is None # Check None
assert x is not None # Check not None
assert isinstance(x, int) # Type check
# Exception testing
with pytest.raises(ValueError):
function_that_raises()
# Parametrize (run same test with multiple inputs)
@pytest.mark.parametrize("input,expected", [(1,2), (3,4)])
def test_func(input, expected):
assert func(input) == expected
# Fixtures (setup)
@pytest.fixture
def sample_data():
return {"key": "value"}
def test_using_fixture(sample_data):
assert sample_data["key"] == "value"
Template
import pytest
def test_case():
assert function() == expected
def test_exception():
with pytest.raises(ValueError):
function_with_bad_input()
Practical Scenario (Ecommerce)
import pytest
def calculate(price, membership, seasonal):
if price < 0:
raise ValueError("Price cannot be negative")
discount = {"regular": 0, "premium": 0.1, "vip": 0.2}
if membership not in discount:
raise ValueError("Invalid membership type")
total = discount[membership] + seasonal
if total > 0.5:
total = 0.5 # Cap at 50%
return price * (1 - total)
# --- TESTS ---
def test_normal():
assert calculate(1000, "regular", 0) == 1000
def test_premium():
assert calculate(1000, "premium", 0.1) == 800
def test_vip():
assert calculate(1000, "vip", 0.1) == 700
def test_cap():
"""Discount capped at 50%"""
assert calculate(1000, "vip", 0.4) == 500
def test_negative_price():
with pytest.raises(ValueError):
calculate(-1, "regular", 0)
def test_invalid_membership():
with pytest.raises(ValueError):
calculate(1000, "gold", 0)
def test_zero_price():
assert calculate(0, "premium", 0.1) == 0
def test_high_seasonal():
"""Seasonal alone exceeds 50% → should cap"""
assert calculate(1000, "regular", 0.6) == 500
Run Pytest:
python -m pytest filename.py -v
-v = verbose (shows each test name and PASS/FAIL)
Global System (Use Same Everywhere)
Write this once in paper:
System: Hospital Management System
Actors: Patient, Doctor, Admin
Core Flows:
- Patient books appointment
- Doctor consults and prescribes
- System generates bill
- Admin manages users and reports
Entities: Patient, Doctor, Appointment, Billing, Prescription
Use same entities everywhere. No variation.
UML & System Diagrams
1. Use Case Diagram (Modelio)
What Examiner Checks
- Actors (stick figures)
- System boundary (rectangle)
- Use cases (ovals inside boundary)
<<include>>, <<extend>> (dashed arrows)
- Associations (solid lines)
How to Draw (Modelio Step-by-Step)
- Open Modelio
- Create new project → name it (e.g. HospitalSystem)
- Right click → Create Diagram → UML → Use Case Diagram
- Drag "Actor" from palette → place left side
- Rename → Patient
- Add second actor → Doctor
- Add third actor → Admin
- Drag "System" (rectangle boundary)
- Name → Hospital Management System
- Inside system:
- Drag Use Case → Book Appointment
- Drag → Pay Bill
- Drag → Consult Patient
- Drag → View Reports
- Connect:
- Patient → Book Appointment (solid line)
- Patient → Pay Bill (solid line)
- Doctor → Consult Patient (solid line)
- Admin → View Reports (solid line)
- Add include:
- Add use case → Check Availability
- Draw dashed arrow: Book Appointment → Check Availability
- Label:
<<include>>
- Add extend:
- Add → Apply Insurance
- Dashed arrow: Apply Insurance → Pay Bill
- Label:
<<extend>>
Rules (Critical)
- Actors always outside system boundary
- Use cases always inside system boundary
<<include>> = mandatory sub-flow (always happens)
<<extend>> = optional sub-flow (may or may not happen)
- Arrow direction:
- include → from main use case TO sub use case
- extend → from extending use case TO base use case
- Actor-to-use-case = solid line (no arrow)
- include/extend = dashed arrow with label
Common Errors
- ❌ Actor inside system → wrong
- ❌ Solid arrow instead of dashed for include/extend → wrong
- ❌ Writing include as normal text (must be
<<include>>) → wrong
- ❌ Missing system boundary rectangle → marks cut
- ❌ No labels on dashed arrows → marks cut
Use Case Diagram

2. Class Diagram (Modelio)
What Examiner Checks
- Classes with attributes & methods
- Relationships (association, aggregation, composition, inheritance)
- Multiplicity
- Visibility (
+ public, - private, # protected)
How to Draw
- Create → UML → Class Diagram
- Add classes: Patient, Doctor, Appointment, Billing
- Add attributes:
- Patient →
-id: int, -name: String, -phone: String
- Doctor →
-id: int, -specialization: String
- Appointment →
-date: Date, -time: String, -status: String
- Billing →
-amount: double, -paymentMode: String
- Add methods (optional):
- Patient →
+bookAppointment(), +payBill()
- Doctor →
+consultPatient()
- Add relationships:
- Patient → Appointment — Association, multiplicity:
1 to *
- Doctor → Appointment — Association, multiplicity:
1 to *
- Patient → Billing — Association, multiplicity:
1 to 1
Relationship Types
| Type |
Symbol |
Meaning |
Example |
| Association |
Solid line |
"uses" or "interacts" |
Patient — Appointment |
| Aggregation |
Empty diamond ◇ |
"has-a" (weak, can exist alone) |
Hospital ◇— Doctor |
| Composition |
Filled diamond ◆ |
"owns" (strong, can't exist alone) |
Order ◆— OrderItem |
| Inheritance |
Empty triangle △ |
"is-a" |
Admin △— User |
Rules
- Class = rectangle with 3 sections (Name / Attributes / Methods)
- Multiplicity must be written (
1, *, 0..1, 1..*)
- Association line is solid
- Inheritance uses empty triangle arrow
- Visibility:
+ public, - private, # protected
Common Errors
- ❌ No multiplicity → marks cut
- ❌ Writing methods unnecessarily when not asked → waste time
- ❌ Random arrows without labels → wrong
- ❌ Missing attribute types → marks cut
Class Diagram

3. Use Case Model (Theory + Diagram)
Just reuse Use Case diagram. Add 1–2 lines:
- Shows system functionality from the user's perspective
- Shows actor interaction with the system
- Identifies system boundary — what's inside vs outside the system
4. Interaction Model
Two types: Sequence and Communication
4A. Sequence Diagram (Modelio)
What Examiner Checks
- Lifelines (vertical dashed lines with object name)
- Messages (horizontal arrows with labels)
- Order (top to bottom = time flow)
- Return messages (dashed arrows going back)
- Activation bars (optional thin rectangles)
How to Draw
- Create → Sequence Diagram
- Add lifelines: :Patient, :System, :Doctor
- Draw messages (top to bottom):
1: bookAppointment() → Patient → System
2: checkAvailability() → System → Doctor
3: confirm() → Doctor → System (return)
4: confirmBooking() → System → Patient (return)
Message Types
| Arrow |
Meaning |
| Solid arrow → |
Synchronous call |
| Dashed arrow ← |
Return message |
| Half arrow → |
Asynchronous message |
Rules
- Time flows top → bottom
- Horizontal arrows = messages
- Activation bars (thin rectangles) show when object is active
- Return messages are dashed
- Name format:
:ClassName or objectName:ClassName
Common Errors
- ❌ Wrong direction arrows (return going forward)
- ❌ Random spacing (keep messages evenly spaced)
- ❌ Missing return messages
- ❌ No labels on arrows → marks cut
Sequence Diagram

4B. Communication Diagram
How to Draw
- Create → Communication Diagram
- Add objects: :Patient, :System, :Doctor
- Connect with lines (associations)
- Add numbered messages along the lines:
1: bookAppointment()
1.1: checkAvailability()
1.2: confirm()
2: generateBill()
Rules
- Must use numbering (1, 1.1, 1.2, 2, 2.1…)
- No timeline (unlike sequence diagram)
- Shows the same info as sequence but focuses on object relationships
- Numbers show order of messages
Common Errors
- ❌ Missing numbers → wrong (this is the KEY difference from sequence)
- ❌ Using timeline-style layout → wrong
Communication Diagram

5. ER Diagram (Pencil)
What Examiner Checks
- Entities (rectangles)
- Attributes (ovals)
- Relationships (diamonds)
- Cardinality (1:1, 1:N, M:N)
- Primary key (underlined)
- Open Pencil application
- Select → Shapes → ER Diagram
- Add entities: Patient, Doctor, Appointment
- Add attributes:
- Patient:
patient_id (PK, underline), name, phone, address
- Doctor:
doctor_id (PK, underline), name, specialization
- Appointment:
appt_id (PK, underline), date, time, status
- Add relationships (diamond shapes):
- Patient books Appointment
- Doctor attends Appointment
- Add cardinality:
- Patient
1 — books — N Appointment
- Doctor
1 — attends — N Appointment
Notation Quick Reference
| Shape |
Represents |
| Rectangle |
Entity |
| Oval |
Attribute |
| Diamond |
Relationship |
| Underlined text |
Primary Key |
| Double oval |
Multi-valued attribute |
| Dashed oval |
Derived attribute |
| Double rectangle |
Weak entity |
Rules
- Rectangle = entity
- Oval = attribute
- Diamond = relationship
- Primary key underlined
- Every entity must have a PK
- Cardinality must be written on both sides
Common Errors
- ❌ No cardinality → wrong
- ❌ Mixing UML notation with ER notation → wrong
- ❌ Missing attributes → marks cut
- ❌ Primary key not underlined → marks cut
- ❌ No diamond for relationship → wrong
ER Diagram

6. DFD (Pencil)
Types: Context (Level 0) and Level 1
DFD Notation
| Shape |
Represents |
| Circle / Rounded rectangle |
Process |
| Rectangle |
External Entity |
| Open-ended rectangle |
Data Store |
| Arrow |
Data Flow |
Context Diagram (Level 0) — Steps
- Draw single process (circle): Hospital System
- Add external entities (rectangles): Patient, Doctor, Admin
- Connect with named arrows:
- Patient → Hospital System: "Appointment Request"
- Hospital System → Patient: "Appointment Confirmation"
- Doctor → Hospital System: "Availability Info"
- Hospital System → Doctor: "Patient Details"
Level 1 — Steps
- Break the single process into sub-processes:
- 1.0 Appointment Process
- 2.0 Billing Process
- 3.0 Report Generation
- Add data stores (open-ended rectangles):
- D1: Patient Database
- D2: Appointment Database
- Connect with named data flow arrows
Rules
- NO internal detail in context diagram (only 1 process)
- Data flow arrows must be named (what data is flowing)
- Processes must be numbered (1.0, 2.0, etc.)
- Every process must have at least 1 input and 1 output
- Data stores only appear in Level 1+
Common Errors
- ❌ Mixing ER and DFD notation → wrong
- ❌ No labels on arrows → marks cut heavily
- ❌ Data store in context diagram → wrong
- ❌ Unnamed processes → wrong
- ❌ Two external entities directly connected → wrong (must go through process)
DFD Level 0

DFD Level 1

7. State Diagram (Modelio)
What Examiner Checks
- Initial state (filled circle ●)
- Final state (circle with dot ◉)
- States (rounded rectangles)
- Transitions (arrows with labels)
- Guard conditions
[condition] (optional)
How to Draw
- Create → State Diagram
- Add initial state (filled black circle)
- Add states: Registered, Booked, Treated, Billed, Discharged
- Connect sequentially with arrows
- Add transition labels:
- Registered → Booked:
bookAppointment()
- Booked → Treated:
consultDoctor()
- Treated → Billed:
generateBill()
- Billed → Discharged:
makePayment()
- Add final state (circle with dot)
Rules
- Must have initial state (●) and final state (◉)
- Use arrows for transitions
- Label transitions with event/action
- Guard conditions in square brackets:
[isInsured]
- States use rounded rectangles
Common Errors
- ❌ No initial/final state → marks cut
- ❌ Unlabeled transitions → marks cut
- ❌ Dead-end state (no outgoing transition except final) → wrong logic
State Diagram

8. Component Diagram (Modelio)
What Examiner Checks
- Components (rectangles with component icon)
- Interfaces (lollipop ○ and socket ◠)
- Dependencies (dashed arrows)
How to Draw
- Add components:
- User Interface Module
- Appointment Module
- Billing Module
- Database Module
- Connect with dependency arrows (dashed):
- UI → Appointment (uses)
- UI → Billing (uses)
- Appointment → Database (depends)
- Billing → Database (depends)
- Optionally add provided/required interfaces (lollipop notation)
Rules
- Component = rectangle with component icon (small rectangle with two tabs on left side)
- Show dependency arrows (dashed, with
<<use>> label if needed)
- Group related components if needed
Component Diagram

9. Deployment Diagram (Modelio)
What Examiner Checks
- Nodes (3D boxes)
- Components inside nodes
- Communication paths (solid lines)
- Protocols labeled
How to Draw
- Add nodes (3D boxes):
- Client PC — contains: Web Browser
- Application Server — contains: Application Module, Business Logic
- Database Server — contains: MySQL Database
- Connect nodes with communication paths:
- Client ↔ App Server:
<<HTTP/HTTPS>>
- App Server ↔ DB Server:
<<JDBC/TCP>>
- Label protocols on the communication paths
Rules
- Node = 3D box (cube shape)
- Components go inside their nodes
- Communication paths = solid lines between nodes
- Label protocols (HTTP, TCP, JDBC, etc.)
Common Errors
- ❌ No protocol labels → marks cut
- ❌ Components floating outside nodes → wrong
- ❌ Missing communication paths → incomplete
Deployment Diagram

Quick Revision — Diagram Cheat Sheet
| Diagram |
Tool |
Key Elements |
Don't Forget |
| Use Case |
Modelio |
Actors, System, Use Cases |
<<include>>, <<extend>> as dashed |
| Class |
Modelio |
Classes, Attributes, Relationships |
Multiplicity on EVERY relationship |
| Sequence |
Modelio |
Lifelines, Messages (top→bottom) |
Return messages (dashed) |
| Communication |
Modelio |
Objects, Numbered messages |
Numbering is MANDATORY |
| ER |
Pencil |
Entity, Attribute, Relationship |
Underline PK, write cardinality |
| DFD |
Pencil |
Process, External Entity, Data Store |
Name ALL arrows |
| State |
Modelio |
States, Transitions |
Initial ● and Final ◉ states |
| Component |
Modelio |
Components, Dependencies |
Component icon (tabs) |
| Deployment |
Modelio |
Nodes (3D), Communication paths |
Protocol labels (HTTP, TCP) |
Viva Questions (Quick Answers)
| Question |
Answer |
| What is COCOMO? |
Constructive Cost Model — estimates effort, duration, team size |
| Difference between Organic & Embedded? |
Organic = simple, small team; Embedded = complex, tight constraints |
| What is Function Point? |
Measures software size based on functionality, not lines of code |
| Difference between include and extend? |
Include = mandatory; Extend = optional |
| What is Critical Path? |
Longest path in network, determines minimum project duration |
| What is Float/Slack? |
How much an activity can be delayed without delaying the project |
| Difference between Sequence and Communication diagram? |
Sequence = time-ordered; Communication = shows object relationships with numbered messages |
| What is DFD Context diagram? |
Shows entire system as single process with external entities |
| What is a Burndown chart? |
Shows remaining work vs time in Agile sprints |
| What is WBS? |
Work Breakdown Structure — hierarchical decomposition of project work |
| Difference between Aggregation and Composition? |
Aggregation = weak "has-a" (part can exist alone); Composition = strong "owns" (part dies with whole) |
| What is PERT? |
Program Evaluation Review Technique — uses 3 estimates (O, M, P) for expected time |
| |