Assignment 2
Advanced Programming
Due 18 JULY 2025
,COS3711 Assignment 2: Advanced Programming
Due 18 JULY 2025
The code executes seamlessly without any errors, ensuring reliable and efficient
performance.
Abstract
This submission addresses COS3711 Assignment 2 (2025), as outlined in the official
assignment tutorial letter. The task entailed developing a comprehensive Qt-based
Store Application capable of tracking customer purchases, alongside a robust UDP
Receiver Application designed to display broadcasted transaction data in XML format.
The response features:
• Complete Source Code: Well-commented and organised code for both
applications, adhering strictly to the assignment’s specifications.
• CMake Integration: Ensuring cross-platform build consistency and streamlined
compilation.
• QMainWindow Implementation: Establishing an intuitive and modular main
window architecture.
• Manual GUI Construction: All graphical user interface elements are constructed
programmatically, showcasing mastery of Qt's widget-based design.
• Object-Oriented Programming Principles: The design encapsulates data and
logic effectively, enhancing maintainability and scalability.
, • Design Patterns Utilised:
❖ Singleton Pattern for centralised resource management.
❖ Memento Pattern for state preservation and undo functionalities.
❖ Model-View-Controller (MVC) Architecture for clear separation of
concerns and improved UI responsiveness.
• Memory Management Excellence: Qt’s parent-child hierarchy is leveraged for
robust memory allocation and deallocation, preventing leaks.
• Bonus Features Implemented:
❖ Application splash screen
❖ Custom application icon
❖ Interactive toolbar for enhanced usability
❖ Extended data members for richer transactional records
• Good Programming Practices:
❖ Consistent naming conventions
❖ Use of initializer lists for efficiency
❖ Clean, readable code layout for ease of future maintenance and peer
review
This submission ensures optimal functionality, user experience, and code
reliability, meeting and exceeding the requirements set out in the COS3711
Assignment 2 brief. It exemplifies advanced competency in C++ Qt application
development.