Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Exam (elaborations)

COS3711 Assignment 4 Advanced Programming Year Module, 2026

Rating
-
Sold
-
Pages
11
Grade
A+
Uploaded on
25-07-2026
Written in
2025/2026

This assignment has been carefully put together to give you more than just answers; it walks you through the reasoning behind each one, so you actually understand the material rather than just memorising it. Every solution has been verified for accuracy, with academic references that hold up to scrutiny. Whether you're working through it the night before a submission or using it to reinforce your understanding over time, it's built to be genuinely useful. The explanations are clear without being condescending, and the structure follows what examiners actually look for not just what sounds impressive. If you put in the effort to engage with it properly, distinction-level results are well within reach.

Show more Read less

Content preview

UNIVERSITY OF SOUTH AFRICA
College of Science, Engineering and Technology


⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄


COS3711: Advanced Programming

Assignment 4 | Year Module, 2026

⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄




COS3711
Module Code:
Advanced Programming
Module Name:
Rainfall Tracking Application: Design and
Assignment Topic:
Implementation
Assignment 4
Assignment Number:
80
Total Marks:




Submitted in partial fulfilment of the requirements for Advanced Programming, UNISA 2026

, UNISA | COS3711 Advanced Programming — Assignment 4


e



Question 1: System Design

The rainfall-tracking scenario describes a container holding rainfall observations, a component that
renders that data as an XML document, and a family of interchangeable graph renderers that con-
sume the XML. A clean object-oriented design separates these three concerns and lets the Clien-
t/GUI class coordinate between them without any single class knowing the internal detail of an-
other.


1.1 Partial UML Class Diagram


Four responsibilities emerge directly from the scenario. RainData stores one observation (station,
date, amount). RainRecord is the container that aggregates many RainData objects. RainXml
is solely responsible for converting a RainRecord into the XML format required by the graphing
applications, and is implemented as a singleton since only one XML-generation service is needed
application-wide. Graph is an abstract base that defines the interface every graph type must hon-
our, with BarGraph and ColumnGraph as concrete strategies. The Client class owns the RainRecord,
requests the XML representation from RainXml, and forwards it to whichever Graph the user se-
lected.


1.2 Is the Pattern Behavioural?


The claim needs qualifying rather than a flat yes or no, because the scenario actually calls for two
separate patterns operating in different parts of the design. Choosing between a bar graph and a
column graph at runtime, while keeping both behind one Graph interface, is the Strategy pattern,
and Strategy is correctly classified as behavioural because it is concerned with how an algorithm
is selected and executed, not with how an object is created or how classes are composed struc-
turally. However, the single shared point of access used for XML generation (RainXml) is a Single-
ton, which is a creational pattern since its concern is controlling object instantiation, not runtime
behaviour. So the statement is true only for the graph-selection part of the design; it does not hold
for the XML-generation part.


1.3 Reflective RainData Class


Qt’s meta-object system can still invoke a private slot through QMetaObject::invokeMethod()
even though ordinary client code cannot call it directly, which is exactly the restriction the question

Page 2 of 11

Document information

Uploaded on
July 25, 2026
Number of pages
11
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
R277,98
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BeeNotes teachmetutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
323
Member since
1 year
Number of followers
0
Documents
923
Last sold
1 day ago
BeeNotes

BeeNotes: Buzzing Brilliance for Your Studies Discover BeeNotes, where hard-working lecture notes fuel your academic success. Our clear, concise study materials simplify complex topics and help you ace exams. Join the hive and unlock your potential with BeeNotes today!

4,1

40 reviews

5
24
4
4
3
8
2
1
1
3

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions