Blog
OOAD BSCS 5th Final Past Paper 2013 – UOS Main Campus
University of Sargodha main campus BSCS 5th semester Object Oriented Analysis and Design (OOAD) final term paper, 12 February 2013. Retyped from the original paper, with solved answers below.
Solved answers
Q1 – Little Hampton Air Company
(a) Entities: Pilot, Aircraft, Fixed Wing Aircraft, Rotary Wing Aircraft, Crew Chief, Flight Scheduling Manager, Flight Log (flight hours per pilot per aircraft) and Flight Report.
(b) Class diagram:
+---------------------+ flies +------------------------+
FlightSchedule | Pilot |*-------*| Aircraft |
Manager 1 --->| licenseNo {PK} | | | aircraftNo {PK} |
assigns * | name | | | seatingCapacity |
+---------------------+ | +------------------------+
| 1 FlightLog ^ * | maintained by
| receives (date, hours) | | 1
| * +------+------+ +-------------+
+---------------+ FixedWing RotaryWing | CrewChief |
| FlightReport | noOfEngines speedOfBlade| employeeId |
| week, totals | +-------------+
+---------------+- Aircraft (aircraftNo, seatingCapacity) is the superclass of FixedWing (numberOfEngines) and RotaryWing (speedOfBlade) — generalization.
- Pilot (flyingLicenseNo) * — * Aircraft through association class FlightLog (date, hoursFlown); a pilot is qualified for one or both aircraft types.
- CrewChief (employeeId) 1 — 1..* Aircraft: each aircraft has exactly one crew chief; a crew chief may maintain several aircraft.
- FlightSchedulingManager 1 — * assigns pilots to aircraft each day.
- FlightReport is generated weekly for each pilot (1 Pilot — * reports) from the flight logs.
Q2
(a) Pattern: a named problem/solution pair that captures a proven solution to a recurring design problem in a given context, so it can be reused (e.g. Creator, Singleton, Observer).
(b) GRASP (General Responsibility Assignment Software Patterns) — principles for assigning responsibilities to classes in object design. Patterns: Information Expert, Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication, Indirection and Protected Variations.
(c) Design activities: architectural (logical) design — layers and packages; creating interaction diagrams (sequence/communication) for system operations using GRASP; creating design class diagrams; designing the user interface; database/persistence design; mapping design to code; applying design patterns (GoF).
Q3
(a) Design class diagrams depend on: the domain model (conceptual classes and attributes), interaction diagrams (which messages each class receives → methods and visibility), and system sequence diagrams/operation contracts from the use cases.
(b) Domain model vs DCD: the domain model shows real-world conceptual classes with attributes and associations, no methods or software details (analysis). The design class diagram shows software classes with attributes, methods, types, visibility, navigability arrows and dependencies (design).
Q4
(a) Interaction diagrams are generalised into sequence diagrams and communication (collaboration) diagrams. Sequence diagrams use a fence format with lifelines arranged left to right and time running downward — the order of messages is easy to read. Communication diagrams use a graph/network format with objects placed anywhere and messages numbered along links — space-efficient and show structure, but order is harder to follow.
(b) Weaknesses: sequence diagrams consume horizontal space and are hard to modify when adding objects; communication diagrams make message sequence harder to see and have fewer notation options; both become complex for large scenarios, show only one scenario at a time, and need frequent updating as design changes.
Q5
(a) Associations show structural relationships between classes (who knows/uses whom) with multiplicity and role names. Navigability (arrow on the association) shows the direction of visibility — which object holds a reference and can send messages to the other — which becomes an attribute in code.
(b) Tiers, layers and partitions: a tier is a physical processing node (client tier, web/app server tier, database tier); layers are vertical logical divisions of the software by responsibility (UI layer, application/domain layer, technical services layer); partitions are horizontal divisions of parallel subsystems within a layer (e.g. in the domain layer: Sales, Inventory and Payroll packages). Example: a POS system with a UI layer, a domain layer partitioned into Sales and Inventory, deployed on three tiers.
