Blog
OOAD BSCS 5th Past Paper (30 Marks) – UOS Main Campus
University of Sargodha main campus Object Oriented Analysis & Design paper for BSCS 5th (Regular + Self), 30 marks, 1:30 hour. Retyped from the original paper, with solved answers below.
Solved answers
Q1 – OOA and OOD (3)
Object-oriented analysis (OOA) finds and describes the objects/concepts in the problem domain and their relationships — “doing the right thing” (e.g. in a library: Book, Member, Loan). Object-oriented design (OOD) defines software objects and how they collaborate (classes, responsibilities, methods, interactions) to fulfil the requirements — “doing the thing right” (e.g. a Book class with getTitle()).
Q2 – Why a new process model for OOAD? (3)
The waterfall model assumes requirements are fixed and finished before design, which rarely happens. OO development works best with an iterative and incremental process (like UP): short iterations, early feedback, risk-driven and use-case-driven development, so the object model grows and is refined as understanding improves.
Q3 – UP and RUP (3)
The Unified Process (UP) is an iterative, use-case-driven, architecture-centric, risk-focused software process with four phases: Inception, Elaboration, Construction and Transition. The Rational Unified Process (RUP) is IBM Rational’s detailed, commercial refinement of UP, with defined disciplines (business modelling, requirements, analysis & design, implementation, test, deployment), roles, artefacts and tool support.
Q4 – Why understanding requirements matters (3)
Most project failures come from wrong, missing or changing requirements. Understanding requirements ensures we build what users actually need, gives a basis for design, estimation and testing, reduces rework cost (errors found late are far more expensive), and helps manage scope and stakeholder expectations.
Q5 – Use case diagram: Hospital Management System (6)
- Actors: Receptionist, Doctor, Patient, Information System (secondary actor).
- Receptionist: Register In-Patient, Register Out-Patient, Admit Patient, Discharge Patient, Update Patient Information.
- Doctor: View Patient History, Give Prescription (Give Prescription «include» View Patient History).
- Patient: Request Information / Book Appointment.
- Information System: Provide Patient Information, Generate Reports — connected to the use cases that need data.
Draw the system boundary “Hospital Management System” with these use cases as ovals and the actors outside, linked by association lines.
Q6 – Use case description: Doctor gives prescription (6)
- Use case: Give Prescription Primary actor: Doctor Stakeholders: Patient, Pharmacy
- Preconditions: Doctor is logged in; patient is registered.
- Main success scenario: 1. Doctor enters/selects the patient ID. 2. System shows patient details and history. 3. Doctor examines and enters diagnosis. 4. Doctor adds medicines, dosage and instructions. 5. System checks for allergies/drug interactions. 6. Doctor confirms; system saves the prescription and prints/sends it to the pharmacy.
- Extensions: 1a. Patient not found → system asks the receptionist to register. 5a. Allergy found → system warns; doctor changes the medicine.
- Postconditions: Prescription is stored in the patient’s history.
Q7 – Domain model (6)
Conceptual classes: Patient (In-Patient, Out-Patient as subtypes), Doctor, Receptionist, Appointment, Ward, Bed, Admission, Prescription, Medicine, Bill.
Associations: Patient 1 — * Appointment * — 1 Doctor; Doctor 1 — * Prescription; Prescription * — * Medicine; In-Patient 1 — 1 Admission; Admission * — 1 Bed; Ward 1 — * Bed; Receptionist 1 — * Admission (records); Patient 1 — * Bill. Draw these as classes with attributes (e.g. Patient: patientID, name, age) and multiplicities.
