100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

COS3711 Assignment 2 (ANSWERS) 2025 - DISTINCTION GUARANTEED

Puntuación
-
Vendido
1
Páginas
17
Grado
A+
Subido en
16-07-2025
Escrito en
2024/2025

Well-structured COS3711 Assignment 2 (ANSWERS) 2025 - DISTINCTION GUARANTEED. (DETAILED ANSWERS - DISTINCTION GUARANTEED!)... Implement an application that tracks items bought from a store. Screenshots of possible interfaces have been provided as guidance below. Store application The store keeps a list of customers so that when something is purchased from the store, it is recorded against that customer’s name. Only the customer’s name is required. Only two items are currently sold in the store currently – books and magazines, and only the name of the item is required. Clearly, a list of such items is needed, and the user should be able to add items to the list. When an item is added, the application should automatically make a backup in Downloaded by Vusi Xhumalo () lOMoARcPSD| COS3711/Assignment 2/2025 3 memory in case something goes wrong when the application is being used. Provision should thus be made to restore this list when necessary. Clearly, for the sake of data integrity, you do not want the user to create multiple copies of these lists. When a customer purchases items, a transaction is recorded. The date/time of the purchase is noted, as is the name, type, and quantity of each item purchased as part of the transaction. Use an appropriate widget to indicate which items have already been added as part of this transaction. All transactions should be displayed on the main GUI. A tree model (and appropriate view) should be used so that a user can see a customer’s transactions grouped together. Downloaded by Vusi Xhumalo () lOMoARcPSD| COS3711/Assignment 2/2025 4 The user should be able to broadcast (using UDP) the contents of the model in XML format. This task should be run as a thread in the main application. The required XML format can be seen in the image in the next section. UDP receiver application Create a separate application that simply listens for the broadcast message and displays the received data (in XML format) on the GUI. 3. Requirements The following general requirements should be noted. • Follow good OOP design principles. • You should use menus in your application. • Pointers should be used for all instances of objects, and memory should be properly managed. • Appropriate design patterns should be used where sensible. 4. Extras Bonus marks will be awarded for the following. • The data members required for the classes are very basic and can be extended (like adding a price for each item and tracking the number of items available). Downloaded by Vusi Xhumalo () lOMoARcPSD| COS3711/Assignment 2/2025 5 • Using QMainWindow functionality: o Splash screen o Application icon o Toolbar o About and Help 5. Submission Please check the How to submit the assessments page in the Module orientation lesson on myUnisa before submitting this assignment for information about how to submit the assignment. • Use CMake when setting up your assignment. • Submit only the project folders. • You should not submit the build-desktop folders. • Zip the two folders (for the two parts of the project) into one zipped file for submission.

Mostrar más Leer menos
Institución
Grado










Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Libro relacionado

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
16 de julio de 2025
Número de páginas
17
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

COS3711 Assignment 2 2025
Unique Number:
Due date: 18 July 2025
Project Structure Overview

You’ll need two separate folders/projects:

COS3711_Assignment2/

├── store_app/ <- Project 1: Store application
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── MainWindow.h/.cpp
│ ├── Customer.h/.cpp
│ ├── Item.h/.cpp
│ ├── Transaction.h/.cpp
│ └── ...

├── udp_receiver/ <- Project 2: UDP listener app
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── MainWindow.h/.cpp
│ └── ...




DISCLAIMER & TERMS OF USE
 Educational Aid: These study notes are intended to be used as educational resources and should not be seen as a
replacement for individual research, critical analysis, or professional consultation. Students are encouraged to perform
their own research and seek advice from their instructors or academic advisors for specific assignment guidelines.
 Personal Responsibility: While every effort has been made to ensure the accuracy and reliability of the information in
these study notes, the seller does not guarantee the completeness or correctness of all content. The buyer is
responsible for verifying the accuracy of the information and exercising their own judgment when applying it to their
assignments.
 Academic Integrity: It is essential for students to maintain academic integrity and follow their institution's policies
regarding plagiarism, citation, and referencing. These study notes should be used as learning tools and sources of
inspiration. Any direct reproduction of the content without proper citation and acknowledgment may be considered
academic misconduct.
 Limited Liability: The seller shall not be liable for any direct or indirect damages, losses, or consequences arising from
the use of these notes. This includes, but is not limited to, poor academic performance, penalties, or any other negative
consequences resulting from the application or misuse of the information provided.

, For additional support +27 81 278 3372

Project Structure Overview

You’ll need two separate folders/projects:

COS3711_Assignment2/

├── store_app/ <- Project 1: Store application
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── MainWindow.h/.cpp
│ ├── Customer.h/.cpp
│ ├── Item.h/.cpp
│ ├── Transaction.h/.cpp
│ └── ...

├── udp_receiver/ <- Project 2: UDP listener app
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── MainWindow.h/.cpp
│ └── ...



1. Starter Code – store_app
✅CMakeLists.txt
cmake
CopyEdit
cmake_minimum_required(VERSION 3.5)

project(store_app)

set(CMAKE_CXX_STANDARD 17)

find_package(Qt5 COMPONENTS Core Widgets Network REQUIRED)

add_executable(store_app
main.cpp
MainWindow.cpp MainWindow.h
Customer.cpp Customer.h
Item.cpp Item.h
Transaction.cpp Transaction.h
)

target_link_libraries(store_app Qt5::Core Qt5::Widgets Qt5::Network)



✅main.cpp
cpp
CopyEdit
#include <QApplication>
#include "MainWindow.h"

, For additional support +27 81 278 3372


int main(int argc, char *argv[]) {
QApplication app(argc, argv);
MainWindow w;
w.show();
return app.exec();
}



✅MainWindow.h
cpp
CopyEdit
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTreeView>
#include <QStandardItemModel>
#include <QUdpSocket>
#include <QPushButton>

class MainWindow : public QMainWindow {
Q_OBJECT

public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();

private slots:
void onBroadcastClicked();

private:
QStandardItemModel *transactionModel;
QPushButton *broadcastButton;
void setupUI();
void populateDummyData();
};

#endif // MAINWINDOW_H



✅MainWindow.cpp
cpp
CopyEdit
#include "MainWindow.h"
#include <QVBoxLayout>
#include <QTreeView>
#include <QXmlStreamWriter>
#include <QByteArray>
#include <QThread>
#include <QUdpSocket>
#include <QPushButton>

MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent),
transactionModel(new QStandardItemModel(this))
{
$3.09
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Edge
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
9692
Miembro desde
2 año
Número de seguidores
4253
Documentos
2681
Última venta
1 día hace

4.2

1180 reseñas

5
665
4
237
3
178
2
27
1
73

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes