0% found this document useful (0 votes)
3 views6 pages

SRE

The document contains answers to the SOFTWARE ENGINEERING FINAL 2024 exam, covering key concepts in object orientation, design patterns, software development models, and software engineering principles. It includes definitions, characteristics, class diagrams, use case scenarios, and improvement techniques for software design. Additionally, it discusses the impact of poor design and outlines various software development methodologies.

Uploaded by

Madalitso Mutiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

SRE

The document contains answers to the SOFTWARE ENGINEERING FINAL 2024 exam, covering key concepts in object orientation, design patterns, software development models, and software engineering principles. It includes definitions, characteristics, class diagrams, use case scenarios, and improvement techniques for software design. Additionally, it discusses the impact of poor design and outlines various software development methodologies.

Uploaded by

Madalitso Mutiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Here are the answers to the SOFTWARE ENGINEERING FINAL 2024 exam from the

uploaded document, section by section:

SECTION A (Compulsory – 40 Marks)


QUESTION 1
a) Define Object Orientation giving two examples of what an object has and explain what a
class is.

Object Orientation is a programming paradigm based on the concept of “objects”, which can
contain data (attributes) and code (methods). It emphasizes reusability, encapsulation, and
modularity.

• Examples of object properties:


1. Attributes (e.g., accountNumber, balance for a BankAccount object)
2. Methods (e.g., transferFunds(), checkBalance())

A class is a blueprint or template for creating objects. It defines the attributes and methods that
the object will have.

b) Describe three characteristics of object orientation. (3 marks)

1. Encapsulation – Bundling data and methods operating on that data within one unit
(class).
2. Inheritance – A class can inherit attributes and methods from another class.
3. Polymorphism – Objects can take on more than one form, allowing for method
overloading and overriding.

c) Main classes and objects in the mobile banking application. (6 marks)


Class Attributes Methods

User username, password, userID login(), logout()

Account accountNumber, balance, accountType viewBalance(), transferFunds()

Transaction transactionID, amount, date createTransaction()


Class Attributes Methods

BillPayment billType, amount, dueDate payBill()

d) Design the class diagram (inheritance, composition, aggregation). (10 marks)

• User class has-a (aggregation) Account


• Account class has-a (composition) Transaction (a transaction can't exist without
an account)
• BillPayment inherits from Transaction

User
└── Aggregates --> Account
└── Composes --> Transaction
Transaction
└── Inherited by --> BillPayment

e) Use case diagram for the login process. (7 marks)

Actors: User
Use Cases: Enter Username/Password → Validate Credentials → Login Successful / Login
Failed

+-------------+
| User |
+-------------+
|
v
+--------------------+
| Enter Credentials |
+--------------------+
|
v
+--------------------+
| Validate Login |
+--------------------+
/ \
v v
Success Failure

f) Scenario for transferring funds between accounts. (6 marks)

Scenario Steps:

1. User logs into the app.


2. Selects "Transfer Funds".
3. Chooses source account (e.g., Savings).
4. Chooses destination account (e.g., Checking).
5. Enters amount and confirms.
6. System validates balance.
7. If valid, transfer is completed and transaction is logged.
8. User receives notification of successful transfer.

g) Modifying use case diagram to include bill payment. (6 marks)

Add the following use case and connect it to the User actor:

• New Use Case: Pay Bills


o Sub-use cases: Select Bill Type, Enter Amount, Confirm Payment

Extend the original diagram:

User
|
v
+-------------+
| Pay Bills |
+-------------+
|
+-------------------+
| Select Bill Type |
| Enter Amount |
| Confirm Payment |
+-------------------+

SECTION B (Choose any 3 – 60 Marks)

QUESTION 2
a) Pipes and Filters (5 marks)

A design pattern where data is passed through a sequence of processing components (filters)
connected by pipes.

Diagram:

Input → [Filter1] → [Filter2] → [Filter3] → Output


b) Repositories (5 marks)

Centralized data storage where multiple components can access and modify data.

Diagram:

[Component1]
→ [Repository] ← [Component2]
[Component3]

c) Layering (5 marks)

System is structured into layers: e.g., Presentation, Business Logic, Data Access.

Diagram:

+-------------------+ (UI Layer)


| Interface |
+-------------------+
| Business Logic |
+-------------------+
| Data Access Layer |
+-------------------+

d) Client-Server (5 marks)

Client requests services, server provides them.

Diagram:

[Client] <---> [Server]

QUESTION 3
a) Why software fails (3 marks)

• Poor design or requirements


• Unhandled exceptions
• Data type mismatches
• Inadequate testing
b) Impact of poor software design + 4 design improvement techniques (7 marks)

Impact: Results in fragile, hard-to-maintain systems, increased cost and failures.

Improvement Techniques:

1. Modularization
2. Abstraction
3. Reusability
4. Refactoring

c) Conceptual vs. Technical Design (10 marks)

• Conceptual Design: What the system will do (User’s perspective)


o E.g., wireframes, user stories
• Technical Design: How the system will work (Programmer’s perspective)
o E.g., database schema, class diagrams

Diagram:

Conceptual → Technical
(User goals) (System implementation)

QUESTION 4
a) Four Software Development Models (10 marks)

1. Waterfall – Sequential, rigid phases.


2. Agile – Iterative and incremental, collaborative.
3. Spiral – Combines iterative nature with risk analysis.
4. V-Model – Extension of Waterfall with validation/verification at each stage.

b) Coupling and Cohesion (6 marks)

• Cohesion: Degree to which elements inside a module belong together. High


cohesion = good.
• Coupling: Degree of interdependence. Low coupling = good.
c) Four types of coupling (4 marks)

1. Content Coupling
2. Common Coupling
3. Control Coupling
4. Data Coupling

QUESTION 5
a) Wasserman’s Discipline of Software Engineering (8 marks)

Principles for systematic software engineering:

• Abstraction
• Modularity
• Reusability
• Incrementality
• Consistency
• Validation

b) System built from Engineering Approach (12 marks)

• Starts from requirements gathering, followed by design, implementation, testing,


and maintenance.
• Emphasizes documentation, planning, risk management, and quality assurance.

If you’d like diagrams designed visually or answers reformatted for printing or study notes, let
me know!

You might also like