Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 11 páginas
Examen

COS3711 Assignment 4 Advanced Programming Year Module, 2026

Document preview thumbnail
Vista previa 2 fuera de 11 páginas

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.

Vista previa del contenido

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

Libro relacionado
 image
Desconocido Advanced Programming
Editorial: 1970 ISBN: 9780983384021 Edición: Desconocido

Información del documento

Subido en
25 de julio de 2026
Número de páginas
11
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$16.11

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
BeeNotes
4.1
(40)
Vendido
331
Seguidores
0
Artículos
974
Última venta
18 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes