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 2 (COMPLETE ANSWERS) 2026 - DUE 9 July 2026

Rating
-
Sold
5
Pages
61
Grade
A+
Uploaded on
09-07-2026
Written in
2025/2026

COS3711 Assignment 2 (COMPLETE ANSWERS) 2026 - DUE 9 July 2026; 100% TRUSTED Complete, trusted solutions and explanations. For assistance, Whats-App 0.6.7-1.7.1-1.7.3.9. Ensure your success with us ..... One way to draw a set of shapes (squares, circles, rectangles, and ellipses) is to use an inheritance hierarchy similar to the one below. The base class holds basic pen and brush values, and subclasses hold a number of additional properties (squares and circles need one property – the radius of a circle for example, whereas rectangles and ellipses need an additional property – length and width of the two sides of a rectangle, for example). The Shape, Shape1Property (for circles and squares), and Shape2Property (for ellipses and rectangles) classes are abstract classes (the draw() function being the pure virtual function in all of them). COS3711/Assignment 2/2026 3 Use this structure to create an application that will draw the required shape in a GUI window. The UML diagram gives only the basic structure, and you will need to add getter and setters, other constructors, and helper functions as you need them. Note that if you cannot get the image to appear, you should at least display the shape properties in a GUI window so that the following three questions can also be completed. Extend the application in Question 1 by adding a class that will maintain a list of shapes. You will want only one list in the application, so use an appropriate design pattern to ensure this. As items are added to the list, allow the user to move backwards and forwards through the list. Using the XML file below, import the shapes contained in it when the application starts up (using DOM), and display the first one. You should then be able to navigate through the 4 shapes and add new ones to the list. shapeList shape type="Square" pw="1" pc="Red" fc="Black" p1="110" p2="" / shape type="Circle" pw="2" pc="Green" fc="Blue" p1="75" p2="" / shape type="Ellipse" pw="3" pc="Black" fc="Red" p1="140" p2="55" / shape type="Rectangle" pw="4" pc="Blue" fc="Green" p1="75" p2="120" / /shapeList Ensure that all necessary file checks are implemented. COS3711/Assignment 2/2026 Extend the application in Question 3 using a Memento pattern to enable a backup/restore facility. Allow the user to keep the state of the application at a user-indicated point, and return the state of the application to that point (again, when the user chooses), and display the first shape in the list. You need only allow for a single backup point.

Show more Read less











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 9, 2026
Number of pages
61
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

R75,00
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.
EduPal University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
153190
Member since
7 year
Number of followers
36023
Documents
4941
Last sold
6 hours ago

At EduPal we provide academic assistance, exam preparation, detailed notes, and exam packs to help college students study with confidence. Our tutoring is comprehensive and personalised, focusing on your subject needs and deadlines. We guarantee quality support, clear guidance, and proven strategies that improve understanding, marks, and pass rates. For more information Whats-App 0.8.1..2.7.8..3.3.7.2..

4,2

14252 reviews

5
8272
4
2783
3
1868
2
484
1
845

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