Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4.2 TrustPilot
logo-home
Examen

COS3711 EXAM PACK 2025 - DISTINCTION GUARANTEED

Note
-
Vendu
15
Pages
166
Qualité
A+
Publié le
29-01-2025
Écrit en
2024/2025

Well-structured COS3711 EXAM PREPARATION PACK - DISTINCTION GUARANTEED. Contains recent exam questions and answers, and Summarised study notes. All you need to pass the 2025 EXAMS

Établissement
Cours











Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

Livre connecté

École, étude et sujet

Établissement
Cours

Infos sur le Document

Publié le
29 janvier 2025
Nombre de pages
166
Écrit en
2024/2025
Type
Examen
Contenu
Questions et réponses

Sujets

Aperçu du contenu

COS3711
EXAM PACK
 Recent exam questions and answers

 Summarised study notes

 Exam tips and guidelines


+27 81 278 3372
DISCLAIMER & TERMS OF USE
1. Educational Aid: These study notes are designed to serve as educational aids and should not be considered as a
substitute for individual research, critical thinking, or professional guidance. Students are encouraged to
conduct their own extensive research and consult with their instructors or academic advisors for specific
assignment requirements.
2. Personal Responsibility: While every effort has been made to ensure the accuracy and reliability of the
information provided in these study notes, the seller cannot guarantee the completeness or correctness of all
the content. It is the responsibility of the buyer to verify the accuracy of the information and use their own
judgment when applying it to their assignments.
3. Academic Integrity: It is crucial for students to uphold academic integrity and adhere to their institution's
policies and guidelines regarding plagiarism, citation, and referencing. These study notes should be used as a
tool for learning and inspiration, but any direct reproduction of the content without proper acknowledgment and
citation may constitute academic misconduct.
4. Limited Liability: The seller of these study notes shall not be held liable for any direct or indirect damages,
losses, or consequences arising from the use of the notes. This includes, but is not limited to, poor grades,
academic penalties, or any other negative outcomes resulting from the application or misuse of the information
provide

]

, UNIVERSITY EXAMINATIONS




January/February 2022

COS3711

Advanced Programming

80 Marks

Duration 2 Hours

EXAMINERS:
FIRST: DR CL PILKINGTON
SECOND: MR K HALLAND
EXTERNAL: DR L MARSHALL (UNIVERSITY OF PRETORIA)

This paper consists of 6 pages.
Instructions
1. You may type your answers in a word processor (and then print to PDF for submission) or
handwrite your answers (and then scan to PDF).
2. Answer all questions. Please answer questions in order of appearance.
3. The mark for each question is given in brackets next to each question.
4. Note that no pre-processor directives are required unless specifically asked for.
5. Students must upload their answer scripts in a single PDF file (answer scripts must not be
password protected or uploaded as “read only” files)
6. NO emailed scripts will be accepted.
7. Students are advised to preview submissions (answer scripts) to ensure legibility and that the
correct answer script file has been uploaded.
8. Students are permitted to resubmit their answer scripts should their initial submission be
unsatisfactory. However, only three submissions are allowed.
9. Incorrect file format and uncollated answer scripts will not be considered.
10. Incorrect answer scripts and/or submissions made on unofficial examinations platforms will not
be marked and no opportunity will be granted for resubmission.
11. The mark awarded for an incomplete or illegible scanned submission will be the student’s final
mark. No opportunity for resubmission will be granted.
12. Submissions will only be accepted from registered student accounts.
13. Students who do not utilise the required invigilation or proctoring tools (IRIS) will be subjected to
disciplinary processes.
14. Students suspected of dishonest conduct during the examinations will be subjected to
disciplinary processes. UNISA has zero tolerance for plagiarism and/or any other forms of
academic dishonesty.
15. Students are provided one hour to submit their answer scripts after the official examination time.
Submissions made after the official examination time will be rejected by the examination
regulations and will not be marked.
16. Students experiencing network or load shedding problems are advised to apply, together with
supporting evidence, for an aegrotat within 3 days of the examination session.
17. Students experiencing technical problems should contact the SCSC on 080 000 1870 or email
or refer to Get-Help for the list of additional contact numbers.
Communication received from your myLife account will be considered.
Remember to complete the Honesty Declaration when submitting your answers. By
submitting your answers you are confirming that your submission is your own, unaided work.




This study source was downloaded by 100000894283260 from CourseHero.com on 01-28-2025 23:57:22 GMT -06:00 [TURN OVER]

https://www.coursehero.com/file/146195459/COS3711-2022-JanFeb-Question-paper-1pdf/

, 2 COS3711
January/February 2022

Transporting cargo around the world is essential in ensuring that customers have access to the
goods they need and want.
All such items are packaged in some sort of container (which, for the purposes of this scenario,
has some volume). Generally, there are two kinds of containers: (i) a box (where we want to
know whether it is cube shaped or not), and (ii) a cylinder (where we want to know its diameter).
For transport, containers are packed onto pallets, and pallets are then included in a load (where
each load will have a code).

Question 1 [24 marks]

1.1 Considering the scenario given above, draw a partial UML class diagram that captures
the scenario. You should include the necessary classes, class attributes, and class
relationships that are mentioned in the scenario. You do not have to include the
Client/GUI class nor indicate constructors, access specifiers, or other methods in the
classes you specify.
[You may use a software tool to create the UML class diagram.] (14)

1.2 Would you use aggregation or composition relationships in the design of this UML class
diagram? Explain why you have or have not done so. (2)

1.3 The load code takes the following format.
• Year value between 2000 and 2099 (both included)
• Forward slash (/)
• Month value between 01 and 12 (both included)
• Forward slash (/)
• L
• A serial number starting from 1, running up to 9999
Write the regular expression (in quotes) that can be used to check that a load code meets
the required criteria. An example of a valid code is 2022/01/L1. Ensure that you use
escape characters correctly. (8)

Question 2 [40 marks]

The intention is to serialise container objects using reflective programming approaches. The
idea is to convert all object data in a load to XML and save this data on a network store.

2.1 What is the major benefit of using a reflective approach in this scenario? (2)

2.2 For a container object that is urgent, the users want to add a property to just this specific
object. In such cases, the property name is urgent and its value is a message indicating
its priority (such as high priority). Assuming that the classes are set up to allow this
ability, write the code to implement this intention for an object named obj.
[Note that this approach can be used to add other optional properties to other objects
where necessary.] (2)

2.3 Consider the requirement to serialise the load class to and from XML.

2.3.1 The following UML class diagram for the serialisation has been provided (where the
QString is the XML text) for some Load class.

This study source was downloaded by 100000894283260 from CourseHero.com on 01-28-2025 23:57:22 GMT -06:00 [TURN OVER]

https://www.coursehero.com/file/146195459/COS3711-2022-JanFeb-Question-paper-1pdf/

, 3 COS3711
January/February 2022




It has been argued that this is incorrect. Provide a better UML class diagram. (3)

2.3.2 The following partial class definition has been provided to achieve the write part of the
serialisation using DOM to write to XML.
class XmlHandler
{
public:
XmlHandler();
QString writeXml(Load load);
private:
QDomDocument doc;
};

The intension is to provide the following XML code. Comments on the right are for
explanatory purposes.

<Load code="2021/01/L1"> the load code is included
<Pallet> all containers on the pallet are added
<Box urgent="High priority"> the type of container with message
<volume>1</volume> all properties with values
<cube>true</cube>
</Box>
<Cylinder> next container
<volume>3</volume>
<diameter>3</diameter>
</Cylinder>
</Pallet>
<Pallet> next pallet in the load
<Box>
<volume>2</volume>
<cube>false</cube>
</Box>
<Cylinder>
<volume>4</volume>
<diameter>4</diameter>
</Cylinder>
</Pallet>
</Load>



This study source was downloaded by 100000894283260 from CourseHero.com on 01-28-2025 23:57:22 GMT -06:00 [TURN OVER]

https://www.coursehero.com/file/146195459/COS3711-2022-JanFeb-Question-paper-1pdf/
2,65 €
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
Edge
S'abonner Vous devez être connecté afin de pouvoir suivre les étudiants ou les formations
Vendu
9706
Membre depuis
2 année
Nombre de followers
4253
Documents
2686
Dernière vente
10 heures de cela

4,2

1181 revues

5
666
4
237
3
178
2
27
1
73

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions