100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COS3711 Assignment 3 2025

Rating
-
Sold
-
Pages
18
Grade
A+
Uploaded on
14-09-2025
Written in
2025/2026

COS3711 Assignment 3 2025 100% solved answers.Stop starting from scratch.Download your copy today and get a head start.

Institution
Course










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

Written for

Institution
Course

Document information

Uploaded on
September 14, 2025
Number of pages
18
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COS3711
Assignment 3
Unique No:
Due 2025

,Part A — Client side: serializing pallets and sending over TCP (threaded)

Design overview

 Use QXmlStreamWriter to construct the XML document in a structured and
efficient manner.
 Perform both serialization and network transmission inside a worker object that is
executed on a QThread so the GUI remains responsive.
 The worker communicates with the UI through signals that report progress,
success, or error conditions.
 When the TCP connection to the server is established and the XML data has
been transmitted, the resulting XML string is displayed inside a QTextEdit widget
in the serialization tab.

Container code validation

The server uses this regular expression to check container identifiers:

^(20[0-9]{2})/(0[1-9]|1[0-2])/[BC](\d{1,4})$

 Year: 2000–2099
 Month: 01–12
 Category: B or C
 Serial number: 1–9999

Client: SerializationWorker (Header)
// SerializationWorker.h
#ifndef SERIALIZATIONWORKER_H
#define SERIALIZATIONWORKER_H


#include <QObject>
#include <QString>
#include <map>

, #include <memory>
#include <vector>


// Forward declarations
class Pallet;
class QTcpSocket;


/*
* SerializationWorker
*
* This worker is designed to run on a background thread.
* It handles XML construction from pallet data and
* transmits the result to a remote server.
*/
class SerializationWorker : public QObject {
Q_OBJECT
public:
explicit SerializationWorker(const std::map<int, Pallet*>& pallets);
~SerializationWorker();


public slots:
// Entry point for execution when moved to a thread
void process();


signals:
// Triggered when XML has been built and sent successfully
void finished(const QString& xml);


// Triggered when an error occurs
void error(const QString& message);

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.
AcademicAnchor University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
47
Member since
2 year
Number of followers
1
Documents
382
Last sold
2 months ago
Academic Anchor

Welcome to AcademicAnchor – Your Trusted Source for High-Quality Assignments, Exam Packs and Study Notes. At AcademicAnchor, we provide expertly written, exam-ready study guides, summaries, and notes designed to help students succeed. Whether you\'re preparing for finals, catching up on lectures, or aiming for top grades, our materials are crafted to save you time and boost your performance. ✔️ Clear &amp; concise notes ✔️ Covers key concepts and exam tips ✔️ Perfect for last-minute revision ✔️ Trusted by hundreds of students Join thousands of learners who use AcademicAnchor to stay grounded in their studies and achieve academic success.

Read more Read less
3.6

11 reviews

5
5
4
1
3
3
2
0
1
2

Recently viewed by you

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

Frequently asked questions