Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 37 páginas
Examen

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

Document preview thumbnail
Vista previa 4 fuera de 37 páginas

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


Libro relacionado
 image
Bjarne Stroustrup Programming
Editorial: 2014 ISBN: 9780133796742 Edición: Desconocido

Información del documento

Subido en
10 de agosto de 2026
Número de páginas
37
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$4.78

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

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.
EduPal
4.2
(14358)
Vendido
153954
Seguidores
36024
Artículos
5132
Última venta
3 horas hace



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

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