Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 37 pages
Exam (elaborations)

COS3711 Assignment 3 (COMPLETE ANSWERS) 2026- DUE 11 August 2026

Document preview thumbnail
Preview 2 out of 37 pages

COS3711 Assignment 3 (COMPLETE ANSWERS) 2026- DUE 11 August 2026; 100% TRUSTED Complete, trusted solutions and explanations. For assistance, Whats-App 0.8.1..2.7.8..3.3.7.2... Ensure your success with us.... Question 1 Create a simple GUI that allows the user to enter a student number, module code, and mark. These should then be output to the console in any format. This will be referred to as the GetStudent application. Include input masks and error checking (using regular expressions) so that information will be correctly entered. · The student number is a 4-digit number. · The module code is made up of 3 uppercase alphabetic characters, followed by a 1, 2, or 3 (for the year), and then a further 2 digits. The final character could be any character (alphabetic or digit). · The mark should be an integer between 0 and 100. This program will be used in the next question as a separate process used to gather data from the user. Question 2 Create a simple GUI application (that you will extend in the next question) that, when a button is clicked, the program that you created in Question 1 (GetStudent) is started as a separate process. When the user clicks the add button in this second process, the data should be displayed on the GUI. Hints: · Have a look at the QProcess class documentation, specifically at the readyReadStandardOutput() signal. · You will need to then read this output, and display it in the window. · Remember to move the .exe file from Question 1’s debug folder to Question 2’s build folder. Question 3 You will now extend Question 2, saving the information that the user adds in a list of students. You will firstly need a Student class that stores a student number and an appropriate container to store a student’s modules and marks. The Student class should contain the following functions. · average() finds the average of all marks of the modules that the student has done. COS3711/Assignment 3/2026 · graduate() returns true if the student has passed 5 modules, of which at most 2 are 1st year modules and at least 1 is a 3rd year module. These values have been reduced to make testing simpler. () sets a student number in the class. · getNumber() access the student number in the class. · addModule() adds a module to the container. · getModules() returns the container to the user. You must also create a StudentList class that keeps a pointer to a list of students implemented as a list of pointers to Student instances. Ensure that there can only one be instance of this list. You will need to include the following functionality. · Ability to add a Student to the list. · Ability to return the whole list. · Ability to check whether a student number exists, returning its index in the list. · Ability to get a Student instance based on an index in the list. · Ability to query the size of the list. The GUI should continue to allow users to add new students as well as display a student record, to get the average of a student’s module marks, and to find out if they qualify for graduation. Note that you should always be checking whether a required student exits before attempting to display any details of that student. Note also that if a user adds a student, module, and module mark, that you should check whether that student is already in the student list. If this is a new student, then the detail can simply be added to the list. If the student already exists, then this new module should simply be added to the list of modules already completed by that student. Below is an example of a GUI, and you may use it’s layout as a guideline; it is not a set requirement. Question 4 Each time you restart the application, you have to re-enter student details. Serialize the StudentList instance to XML using the DOM approach so that when the application is closed the list is written to XML automatically; ensure that there are no problems (like odd file contents) if the student list is empty when the application closes. Below is an example of what the file should look like. StudentList student number1234/number modules COS3711/Assignment 3/2026 module codeCOS3711/code mark67/mark /module module codeCOS1511/code mark67/mark /module /modules /student student number4321/number modules module codeCOS3711/code mark90/mark /module /modules /student /StudentList

Content preview

COS3711
Assignment 3 2026
Unique number:
Due date: 11 August 2026


Question 1 GetStudent Application
The program can be created as a simple Qt Widgets C++ application. The user enters a
student number, module code and mark, then clicks Add. The program checks the
information before printing it to the console.

, Question 1 GetStudent Application
The program can be created as a simple Qt Widgets C++ application. The user enters a
student number, module code and mark, then clicks Add. The program checks the
information before printing it to the console.




1.1 GUI Design
Create the following widgets in Qt Designer:

Widget Object name Purpose
QLabel studentLabel Student Number
QLineEdit studentEdit Enter student number
QLabel moduleLabel Module Code
QLineEdit moduleEdit Enter module code
QLabel markLabel Mark
QSpinBox markSpinBox Enter mark
QPushButton addButton Add information

The student number field must accept four digits. The module field must accept three
uppercase letters, followed by three digits and one letter or number. The mark must remain
between 0 and 100.

1.2 Input Masks
Set the following input masks in Qt Designer:

For the student number:

9999

For the module code:

>AAA999N

Connected book
 image
Marcus Richards Python Advanced Programming
Publisher: Unknown ISBN: 9781657482852 Edition: Unknown

Document information

Uploaded on
August 17, 2025
File latest updated on
August 10, 2026
Number of pages
37
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
R75,00
Purchased by 13 students

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
EduPal
4,2
(14316)
Sold
153742
Followers
36023
Items
5092
Last sold
1 hour ago

Reviews from verified buyers



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions