100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

COS3711 EXAM PACK 2025 - DISTINCTION GUARANTEED

Beoordeling
-
Verkocht
15
Pagina's
166
Cijfer
A+
Geüpload op
29-01-2025
Geschreven in
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

Instelling
Vak











Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Gekoppeld boek

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
29 januari 2025
Aantal pagina's
166
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

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/

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Edge
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
9706
Lid sinds
2 jaar
Aantal volgers
4253
Documenten
2686
Laatst verkocht
11 uur geleden

4,2

1181 beoordelingen

5
666
4
237
3
178
2
27
1
73

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen