Blog
Software Engineering I BSCS BSSE 4th Final Past Paper 2014 – UOS Main Campus
University of Sargodha main campus (Department of Computer Science) Software Engineering I final term paper for BSCS 4th and BSSE 4th, 17 June 2014. Retyped from the original paper, with solved answers below.
The available copy contains the subjective part (Q.2 – Q.5) only.
Solved answers
Q2 – Lemonade stand
Additional activities: manage inventory, record sales, calculate daily profit, schedule employees, handle customer complaints/returns, check product quality.
a) Functional requirements: take customer orders; serve product; collect payment and give receipt; produce lemonade from raw materials; store product and track stock; place orders for raw materials when stock is low; pay suppliers; record labour hours and pay employees; generate daily sales and expense reports.
Non-functional requirements: serve a customer within 2 minutes; system easy to use by untrained staff; payment records accurate and secure; available during all business hours; data backed up daily; hygienic and quality standards for the product.
b) Context-level DFD (level 0): one process “Lemonade Stand System” with external entities Customer (order, payment → product, receipt), Supplier (raw-material order → raw materials, invoice; payment), and Employee (time sheet → wages).
Level 1 DFD: 1.0 Sale (customer order, collect payment) → D1 Sales; 2.0 Serve Product ← D2 Inventory; 3.0 Produce Product (uses raw materials from D3 Raw Materials, stores product in D2); 4.0 Order & Pay for Raw Materials (with Supplier, updates D3, D4 Payables); 5.0 Pay for Labour (Employee time sheets → D5 Payroll).
Customer --order--> [1.0 Take Order & Collect Payment] --sale--> (D1 Sales)
|
v
[2.0 Serve Product] <-- (D2 Product Inventory) <-- [3.0 Produce Product]
^
Supplier <--order/payment-- [4.0 Order & Pay Raw Materials] --> (D3 Raw Materials)
Employee --timesheet--> [5.0 Pay for Labor] --> (D5 Payroll)c) Decompose Customer Order and map to architecture: 1.1 Receive order → 1.2 Check product availability (D2) → 1.3 Calculate bill → 1.4 Collect payment → 1.5 Record sale (D1). Using transaction mapping, “Receive order” is the transaction centre that dispatches to sub-modules; the call-and-return architecture has a main controller Order Controller calling Availability Checker, Billing, Payment Handler and Sales Recorder.
Q3 – Cyclomatic complexity
Two independent if statements = 2 predicate nodes, so V(G) = P + 1 = 3 (also E − N + 2 with 7 edges and 6 nodes = 3). Independent paths: both conditions false; condition1 true; condition2 true.
Q4 – Basic COCOMO (organic mode)
- KLOC = 52
- Effort E = 2.4 × (52)^1.05 ≈ 152 person-months
- Nominal development time T = 2.5 × E^0.38 = 2.5 × (152)^0.38 ≈ 16.9 months
- Cost = 152 × Rs. 30,000 ≈ Rs. 4.56 million; average staff ≈ 152 / 16.9 ≈ 9 engineers.
Q5 – Quality in design
Design is where quality is built into software: it is the first step where requirements are translated into a representation that can be assessed for quality before coding. Poor design leads to unstable, hard-to-test and hard-to-maintain software; fixing design errors later is very costly.
Characteristics of good design: implements all explicit requirements and accommodates implicit ones; readable and understandable for coders, testers and maintainers; gives a complete picture of data, functional and behavioural domains; modular with high cohesion and low coupling; uses recognisable architectural styles and patterns; distinct representations of data, architecture, interfaces and components; supports reuse; traceable to the requirements model; and easy to change and test.
