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
Document preview thumbnail
Preview 3 out of 27 pages
Exam (elaborations)

COS3711 Assignment 3 (COMPLETE ANSWERS) Semester 2025

Document preview thumbnail
Preview 3 out of 27 pages

COS3711 Assignment 3 (COMPLETE ANSWERS) Semester 2025 - DUE 2025; 100% TRUSTED Complete, trusted solutions and explanations.

Content preview

,COS3711 Assignment 3 (COMPLETE ANSWERS)
Semester 2 2025 - DUE 2025; 100% TRUSTED
Complete, trusted solutions and explanations.

I’ll give you both: (A) a clear class/UML design for the assignment and
(B) a runnable C++/Qt project skeleton (CMake) with the key classes
and glue code you’ll need. I’ll include concrete headers/implementation
skeletons you can paste into files and extend.

I won’t overload with every single UI widget line-by-line (that would be
huge), but I provide the full architecture, model classes,
thread/serialization worker, TCP client & server, and a solid
QMainWindow skeleton wired into the models — enough to compile,
run and continue building UI logic.



1) High-level design / UML (textual)

Use these design patterns:

 Factory: to create Box/Cylinder and produce the correct code
(B/C).
 Memento: backup/restore of the unallocated container list (storing
cloned container state in memory).
 Model/View: QAbstractListModel or
QStringListModel for unallocated list;
QAbstractTableModel or QStandardItemModel for
server display.
 Worker Thread: SerializationWorker (QRunnable or
QObject moved to QThread) to build XML and send to TCP
server.
 Observer / Signals: model updates notify UI.

, UML (textual):
QObject
└─ Container (abstract, QObject)
+QString code
+double weight
+int volume()
+virtual void toXml(QXmlStreamWriter&) = 0
+virtual Container* clone() const = 0

Container <- Box (QObject)
+double length, breadth, height

Container <- Cylinder (QObject)
+double diameter, height

ContainerFactory
+static Container* createBox(...)
+static Container* createCylinder(...)

Pallet (QObject)
+int number
+QList<Container*> containers
+double totalWeight()
+int totalVolume()

PalletManager (QObject)
+QMap<int, Pallet*> pallets

UnallocatedListModel : QAbstractListModel
holds QList<Container*>

Memento
+QVector<QByteArray> serializedContainers

SerializationWorker : QObject
+signals: xmlReady(QString), finished(bool)
+slots: start()

TcpClientSender : uses QTcpSocket to send XML to 127.0.0.1:6164

ServerApp (separate project)
- QTcpServer, accepts incoming XML, parse with QXmlStreamReader,
fill QStandardItemModel (display in QTreeView)

Connected book
 image
Gianna Cioni, Andrzej Salwicki Advanced Programming Methodologies
Publisher: 2014 ISBN: 9781483265452 Edition: Unknown

Document information

Uploaded on
September 16, 2025
Number of pages
27
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$2.78

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

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.
EstudyTube
4.0
(70)
Sold
524
Followers
176
Items
826
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card 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