Docsity

Student management application, Study Guides, Projects, Research of Programming Languages

Toggle sidebar
bg1
ASSIGNMENT 2 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
PROG102: Procedural Programming
Submission date
Date Received 1st
submission
Re-submission Date
Date Received 2nd
submission
Student Name
Student ID
Class
Assessor name
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Student’s signature
Grading grid
P5
M3
M4
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Student management application and more Study Guides, Projects, Research Programming Languages in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title PROG102: Procedural Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class Assessor name Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid P 4 P 5 M3 M4 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date: Lecturer Signature: Table of Contents No table of contents entries found.

2.Input The students' IDs and grades are entered in the first array of the program. To keep the round rolling until it meets the requirement, I use the "for" loop.

  1. Max grade

The grade must be in "float" type in this array because it can be a decimal value. It's there because I wanted it to be simple to use. The "for" loop is used to establish a repeated loop for the user, and "int maxid" is used to provide the maximum grade for the student. As we all know, the maximum grade must be lower than the overall grade, thus the software will only process until all of the requirements have been completed.

  1. Display function This is used to print the student's id and grade for the user to see.
  2. Min grade The lowest grade linked with the student's id is displayed in the minimum array. The computer will print the individual with the lowest grade after going through the complete list. The minimum and maximum functions are essentially identical as a result.

II. Operation Implementation

  1. Input number of students (including IDs and grades) The program allows you to enroll as many students as you like. Following your response to the question "How many students?" the MENU will appear, allowing you to choose from 1 to 5 of the options shown. Option 1 is the most crucial since it is an array that contains all of the data that will be utilized in the next four options.

This is what you'll see if you choose 1. You'll need to enter all of the IDs and grades for the number of students you specified previously.

  1. Max This feature allows the teacher to see the maximum point for all of the students who have been previously saved in the application. 4.Min

B. TASK 2. TEST PLAN 1.Student’s input test

. Data Type Input Expected Result Actual Result 1 Positive Integer Numbers 1,2,3, ,....

OK O

K

2 Characters and special Symbols a,b,c,.. .. A,B,C,.. .. Invalid O K 3 Decimal numbers 2.5,3. ,5. ,... Invalid O K 4 Negative Integer Numbers No - 1,-2,- 3,- 4,.... Invalid O K There are four different types of data, and three of them have passed the test. If you enter decimal values, the application will print the integer number because it can only understand integers, letters, and symbols. That oversight must be rectified.

  1. Testing the user’s selection from the MENU
  1. Student’s ID input test N o. Data Type Input Expect ed Resul t Actual Result Status 1 Positive Integer Numbers 1,2,3,4,... OK OK PASSED 2 Negative Integer Numbers - 1,-2,-3,-4,... Invalid input OK FAILED 3 Characters and symbols a,b,c,@,#,%,... Invalid input OK FAILED 4 Decimal Numbers 2.3,4.7,12.3,... Invalid input OK FAILED 5 Duplicated numbers 1,2,3,4,.... Invalid input OK FAILED There are five different types of data being checked, with four of them failing and only one passing. I've tested every potential scenario for the user, including ids with characters or symbols. The only integers that are accepted are those that are positive. Because the user may need to insert some letters to properly sort the pupils, the program requires an upgrade.

4.Student’s name test N o. 1 Data Type Positive Integer Numbers Input 1,2,3,4,... Expected Result OK Actual Result OK Status PASSE D 2 Negative Integer Numbers

Invalid input

OK FAILED

3 Characters a,b,c, OK OK PASSED 4 Decimal Numbers 2.3,4.7,12.3, ... Invalid input

OK FAILED

5 Duplicated numbers 1,2,3,4,.... Invalid input

OK FAILED

C. Task 3 EVALUATE THE PROGRAM

  1. There is a bug in the algorithm (s) Almost all of the tasks provided by the teacher were accomplished by the software. Unfortunately, there is still a bug in my program. Even though the software is supposed to cease running if he unintentionally enters two duplicated IDs, it continues to print out both of them, despite the fact that the same ID can't have two different points at the same time.
  2. A problem with the user interface (s) The MENU may still contain certain faults that make the user hesitant to utilize it.
  3. Upgrading and improving the system in the future The application may look to be buggy, yet the code remains unoptimized, making it slow. I should think about adding some extra features to help the teacher manage the class, such the "pass" and "not pass" methods, so he doesn't have to spend as much time finding out who failed and who passed. The user interface needs to be more complex and appealing. References: https://sites.google.com/site/lanceallenbtecportfolio/currency-converter-project/9-the-test-plan

#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <string.h> struct student{ char name[50], MSV[50]; float grade; } std[30]; int n; void student(int MSV[], float grade[], char name[50], int n) { int i; for (i = 0; i < n; i++) { printf("Enter a number of student \n\n"); printf("MSV:\n"); fflush(stdin); scanf("%d", &MSV[i]); printf("name: \n"); fflush(stdin); scanf(" %s", &std[i].name); printf("grade:\n"); fflush(stdin); scanf("%f", &grade[i]); } } void max(int MSV[0], float grade[], int n)

int i; int posmin =0; double mingrade = grade[0]; for (i = 0; i < n; i++) { if (mingrade > grade[i]) { mingrade = grade[i]; posmin = i; } } printf("MSV: %d mingrade %.2f\n\n", MSV[posmin], mingrade); system("pause"); } int main() { int MSV[n]; float grade[n]; char name[n]; int choice; do { system("cls"); printf(" -Menu- \n"); printf("/=================/\n"); printf(" 1. Input MSV and grade of student\n "); printf(" 2. Display Student information\n"); printf(" 3. Display Max Grade of student \n");

printf(" 4. Display Min Grade of student \n"); printf(" 5. Exit \n"); printf("/=================/\n"); printf(" -End- \n"); fflush(stdin); printf("\n Enter the choice: "); scanf("%d", &choice); switch (choice) { case 1: printf("How many students do you want to add to the list?: \n"); scanf("%d", &n); student(MSV, grade, name, n); system("pause"); system("cls"); break; case 2: display(MSV, grade, name, n); system("pause"); system("cls"); break; case 3: max(MSV, grade, n); system("pause"); system("cls"); break; case 4: min(MSV, grade, n);