Prog102-assignment2 (m), Assignments of Information Technology

This document to share code graded merit for prog102

Typology: Assignments

2020/2021

Uploaded on 11/19/2021

le-duy
le-duy šŸ‡»šŸ‡³

4.9

(15)

9 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Prog102: Procedural Programming
Submission date
9/11/2021
Date Received 1st
submission
Re-submission Date
Date Received 2nd
submission
Student Name
Student ID
Class
GCD0905
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
P1
P2
P3
M1
M2
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Prog102-assignment2 (m) and more Assignments Information Technology in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Prog 102 : Procedural Programming Submission date 9/11/2021 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class GCD0905 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 P1 P2 P3 M1 M2 D

 Summative Feedback:  Resubmission Feedback: Grade: Assessor Signature: Date: Lecturer Signature:

  • I. SOLVE PROBLEM AND RESULT ______________________________________
      1. Problem:______________________________________________________________________________
      1. Solvable problem: ______________________________________________________________________
      1. Explanation code : ______________________________________________________________________
      • a. Global variables: _____________________________________________________________________
      • b. Function input information of student’s: __________________________________________________
      • c. Function find the highest grades of student:________________________________________________
      • d. Function find the lowest grades of student: ________________________________________________
      • e. Menu Options: _______________________________________________________________________
  • II. RESULT __________________________________________________________
      1. Result for the case data 1: ________________________________________________________________
      1. Result for the case data 2: _______________________________________________________________
  • III. TEST SCHEDULE _________________________________________________
  • IV. TEST AND RUN __________________________________________________
      1. Conclusion ___________________________________________________________________________
      1. Evaluation of program: _________________________________________________________________
      • a. Advantage: _________________________________________________________________________
      • b. Disadvantages: ______________________________________________________________________
  • Figures:1 Global variables of program. ______________________________________ TABLE OF FIGURES
  • Figures:2 Input information of student. ______________________________________
  • Figures:3 Print information of student to the screen. ____________________________
  • Figures:4 Find the highest grades of student. __________________________________
  • Figures:5 Find lowest grades of student. _____________________________________
  • Figures:6 Menu options of program. ________________________________________
  • Figures:7 Enter option 1 __________________________________________________
  • Figures:8 Enter the number of students in class ________________________________
  • Figures:9 Input IDs and grades ____________________________________________
  • Figures:10 Show a list___________________________________________________
  • Figures:11 Find the highest grade and IDs __________________________________
  • Figures:12 Find the lowest grade and IDs ___________________________________
  • Figures:13 End the program _____________________________________________
  • Figures:14 Choosing an invalid option _____________________________________
  • Figures:15 Entering duplicated IDs _______________________________________
  • Figures:16 Entering negative grade _______________________________________

I. SOLVE PROBLEM AND RESULT

  1. Problem: A math teacher wants to manage grades of a class. He asks you to help him to write a small application to do that. He needs to enter student IDs, student’s grades and store these information into 2 separate arrays (integer array for IDs and float array for grades). Then he needs to print all student IDs together with their grades. Finally, he needs to know which student has highest grade and lowest grade. Your program should be menu based with the options above. When an option is done, the program should go back to the main menu so he can choose another option. There should be an option to quit program.
  2. Solvable problem: I write a program is used to manage student information. The main functions of program is:
  • Input student information (Student ID, Student Grades)
  • Display student information (Print to the screen)
  • Find the student has highest grades
  • Find the student has lowest grades
  • Exit
  1. Explanation code : a. Global variables:
  • In this program, I use 3 libraries which are stdio.h, stdlib.h and string.h
  • Students for total students, ID[30] for ID, grade [10] for grade Figures:1 Global variables of program. b. Function input information of student’s:
  • This code help you check if you have entered the recently entered ID, use the for loop to check in the array id.

Figures:4 Find the highest grades of student. d. Function find the lowest grades of student:

  • Help you find the student has lowest grades and print to the screen.
  • Print the result on the screen Figures:5 Find lowest grades of student. e. Menu Options:
  • Helps to display more options in the menu.
  • Example: input student ID & grades, view student, find the highest or lowest grades of student, exit program.

This menu have 5 option for choose, if you choose <1 or >5. Input will invalid and choose again. Figures:6 Menu options of program. II. RESULT

  1. Result for the case data 1: We will input the proper information in this situation. To begin, the system will display a menu with five alternatives. We must choose one of them (from option 1 to
  1. and add it to the menu. For example, pressing number 1 will produce a list including all of the students’ IDs and grades. After that, we must input the number of students in the class, their IDs, and their grades. Figures:7 Enter option 1

Press number 3 to display all of students have highest grade and IDs student in class. Otherwise, press 4 to look for all of student and IDs student have lowest grade. Figures:11 Find the highest grade and IDs Figures:12 Find the lowest grade and IDs Finally, press number 5 to exit program Figures:13 End the program

  1. Result for the case data 2: In case 2, I’ll go through some of the most typical errors that people make. To begin, I’ll choose wrong selection. For example, if the user don’t select choice 1- choice 5, system will prompt the user to input again.

Figures:14 Choosing an invalid option When you input duplicated IDs, the user need input again. Figures:15 Entering duplicated IDs When you type negative number in grade, user need to tap right number. Figures:16 Entering negative grade III. TEST SCHEDULE Test case Start date End date Estimated (Hrs./day) Note TC1 8/11/2021^ 8/11/2021^1 TC2 8/11/2021 8/11/2021 1 TC3 8/11/2021 8/11/2021 1 TC4 8/11/2021 8/11/2021 1 TC5 8/11/2021 8/11/2021 1 TC6 8/11/2021^ 8/11/2021^1

TC4 - Input choice 4

Submit Find students’ who has lowest grades Passed TC5 - Input choice 6

Submit Failed Try other number (1-5) TC6 - Input choice 1

Submit Enter number of student: 31 and - 4 Failed Try number in range (1-30) TC7 - Input choice 1

Submit Enter number of student: 1 Enter Students’ ID: GCD Enter student’s grade: 6

|ID:

GCD201871|

|Grade: 6| Failed Don’t type the works TC8 - Input choice any words

Submit Failed Don’t type the words TC9 - Input choice 5 Tap any key to exit Passed

  1. Conclusion Examine the results of the tests in order to plan for future maintenance: During the design and testing process, we discovered a few weaknesses that will need to be fixed in the future. First, if a user enters an ID that contains a character, the system would

exit rather than prompting the user to submit a valid ID and the system will run that prompt continuously and you can't enter anything.

  1. Evaluation of program: a. Advantage:
  • Can store students’ mark and ID, display them on screen and find maximum or minimum grade.
  • Can find the highest or lowest grade clearly and fast and print all student’s IDs.
  • Can check if the ID is duplicated or not and if the grade input is valid or not b. Disadvantages:
  • Application will error when entering the wrongs data types, you can see when I entered ID student with types characters, application will error.
  • Menu interface is not completed beautifully.
  • Infinity loop when enter ID with word. Although there are many errors that have not been resolved, but basically my application has met the basic need of a student management software, the rest I will fixed in the future.