2025 - DUE 18 July 2025; 100% TRUSTED
Complete, trusted solutions and explanations.
This COS3711 Assignment 2 task requires you to build two Qt-
based C++ GUI applications:
1. Store Application – Tracks customers, items, transactions,
with UDP broadcast.
2. Receiver Application – Listens to UDP broadcasts and
displays XML.
Below is a breakdown of how to structure and implement the
solution, covering architecture, classes, design patterns, and
extra features.
✅ PART 1: Store Application
🧱 A. Key Classes and Structure
Class Purpose
Stores customer name and list of
Customer
transactions
Represents either a book or magazine
Item
(name, type)
Transaction Stores item(s), quantity, and timestamp
StoreModel Maintains lists of customers and items
, Class Purpose
Custom QAbstractItemModel for tree
TransactionTreeModel
view
MainWindow Main UI (menus, toolbar, views)
Manages backup/restore in memory
BackupManager
(singleton)
UDPBroadcaster Sends XML over UDP in a thread
XMLExporter Converts current model to XML
💡 B. Features and UI Components
Feature Qt Widget/Function
Add customer QLineEdit + QPushButton
Add item
QComboBox, QLineEdit, QPushButton
(book/magazine)
QTableWidget or QListView with
Transaction creation
checkboxes
QTreeView using
View transactions
TransactionTreeModel
Menus QMenuBar with File, Help, etc.