Professional Documents
Culture Documents
CBCP2101
COMPUTER PROGRAMMING 1
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.
3
Start
Read number of
Students
Read number of
Courses
Read Student ID
no Mar yes
Display “Proceed to ks Display
next Semester” <=39 “Failed
”
End
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
5
6