You are on page 1of 7

BACHELOR OF INFORMATION TECHNOLOGY WITH HONOURS

SEMESTER MAY 2021

CBCP2101

COMPUTER PROGRAMMING 1

MATRICULATION NO: 900919016985001


IDENTITY CARD NO. : 900919016985
TELEPHONE NO. : 0129191935
E-MAIL : hakimattan@oum.edu.my
LEARNING CENTRE : SHAH ALAM LEARNING CENTER

0
INSTRUCTIONS
 Do not copy the assignment question and instructions to your answer.
 Prepare your assignment answer following the layout of the ASSESSMENT
CRITERIA shown in the RUBRICS provided for the course. Where RUBRICS are
not provided, follow the instructions/guidelines specified by the Open University
Malaysia (OUM) for the assignment concerned.
 Your assignment should be written according to the number of words outlined
in the assignment instruction EXCLUDING references.
 Type your answer using 12 point Times New Roman font and 1.5 line spacing.
 Show the number of words at the end of your assignment.
 Tables and figures where provided, should be appropriately titled.
 List your references separately in the APPENDIX page.

1
I. ANALYSIS OF THE PROBLEM AND IDENTIFICATION OF REQUIRED
ITEMS

From the question grading application, it is important to get the total number of
students for the grading process to continue, hence there should be an integer variable
that will store the total number of students for whom the application will calculate the
grades. The application should contain an integer that will contain the number of courses
that for every student.
After the application ask for the student ID and marks in the different courses the
application will calculate the average marks for every student. The program will check
the marks and condition in each course and determine grade for each of them. At the end
of the program if the stored average value become greater or equal to 40 then the program
will print “Proceed to next Semester”. Otherwise, the program will display “Fail”.

2
II. Algorithm in a Pseudo Code

Step 1: Start
Step 2: Read total number of students
Step 3: Read the number of courses for the semester.
Step 4: Read the student ID
Step 5: Read the marks for the different course for the student
Step 6: show grades for the courses.

If (marks >=80 and marks <=100) show Grade A.


Else if (marks >=70 and marks <=79) show Grade B.
Else if (marks >=60 and marks <=69) show Grade C.
Else if (marks >=50 and marks <=59) show Grade D.
Else if (marks >=40 and marks <=49) show Grade E.
Else (show Grade F).

Step 7: Show average marks for all the courses.


Step 8: IF average marks are less than 40 display “Failed”
Else
Print “proceed to next Semester”
Ask for Next student ID
Go to step 4;
If (reached maximum number of student)
Stop.

3
Start

Read number of
Students

Read number of
Courses

Read Student ID

Read marks for a


Student

Mark Mark Mark Mark Mark


>=80 >=70 >=60 >=50 >=40 Mark
and and and and and <=39
<=100 <=79 <=69 <=59 <=49

Display Display Display Display Display Display


Grade A Grade B Grade C Grade D Grade E Grade F

Calculate Average Marks

no Mar yes
Display “Proceed to ks Display
next Semester” <=39 “Failed

End

III. Diagram 1: Flowchart based on pseudo code

4
Steps No of Student No of Marks Marks Marks Grade of Average Final
Students ID courses in in in subject Marks Result
subject subject subject
1 2 3
1
2 3 - - - - - - - -
3 - - 3 - - - - - -
4 - #123 - - - - - - -
5 - - - 56 - - - -
6 - - - - - - D - -
5 - - - - 45 - - -
6 - - - - - - E
5 - - - - - 89 - -
6 - - - - - - A - -
7 - - - - - - - 63.33 -
8 Proceed
to next
Semeste
4 - #234 - - - - - - -
5 - - - 45 - - - - -
6 - - - - - - E - -
5 - - - - 35 - - - -
6 - - - - - - F - -
5 - - - - - 34 - - -
6 - - - - - - F - -
7 - - - - - - - 38 -
8 - - - - - - - - Failed

IV. Table 1: Tracing table for Student Grading

5
6

You might also like