Assignment 3
Unique No:
Due 2025
, COS3711
Advanced Programming
Assignment 3
A — Client side: serialise pallets → send over TCP (threaded)
Design summary
Build XML using QXmlStreamWriter (structured, fast).
Run serialisation + socket write in a worker object moved to a QThread so UI
stays responsive.
Worker emits signals for progress / completion / errors.
When server connection succeeds and XML is sent, display the XML string in a
QTextEdit on the serialisation tab.
Regex for validating container codes (server will use this)
^(20[0-9]{2})/(0[1-9]|1[0-2])/[BC](\d{1,4})$
This matches years 2000–2099, months 01–12, B or C, serial 1–9999.
Client: SerializationWorker (header)
// SerializationWorker.h
#ifndef SERIALIZATIONWORKER_H
#define SERIALIZATIONWORKER_H
#include <QObject>
#include <QString>
#include <map>
#include <memory>
#include <vector>
class Pallet;