Bahria University (Karachi Campus) : Midterm Examination - Spring Semester - 2020 (Computer Programming CSC-113)
Bahria University (Karachi Campus) : Midterm Examination - Spring Semester - 2020 (Computer Programming CSC-113)
Note: Attempt all Questions. Answer each Question on a new page of the same document.
Read Carefully:
The deadline for this assignment is Sunday, May 31, 2020 on LMS.
WARNING: This is an individual assignment; you must solve it by yourself. Any form of
plagiarism will result in receiving zero in the assignment.
WARNING: Late submission will not be accepted. Any assignment submitted after the
cutoff time will receive zero by default (LMS).
This assignment has 04 questions that you have to answer and submit the solution on the
LMS within due deadline.
Page 1 of 4
Write a step by step ALGORITHM and draw a FLOWCHART based on the above scenario.
Page 2 of 4
to be re-arranged/compared e.g. “RE-ARRANGE_MAX_MIN (Int Elements[], int number)”.
The program must be continued with its working based on the user choice until and unless user
hits keyword “No” using input device.
Note: In Final RE-Arranged Array list, 1st number should be of maximum value and 2nd
number should be of minimum value, 3rd number in the array list should be the 2nd maximum
value and 4rth number in the array list should be the 2nd minimum value and so on (See the
output screen).
Page 3 of 4
1. Rule 01:
a. If the student fails in more than three subjects and gets first class then, no grace
marks will be awarded to student.
b. If the student fails in less than or equal to three subjects, then student will be
awarded grace of 5 marks per subject.
2. Rule 02:
a. If the student fails in more than two subjects and gets second class then, no
grace marks will be awarded to student.
b. If the student fails in less than or equal to two subjects, then student will be
awarded grace of 4 marks per subject.
3. Rule 03:
a. If the student fails in more than one subject and gets third class then, no grace
marks will be awarded to student.
b. If the student fails in one subject only, then student will be awarded grace of 5
marks per subject.
4. If user enters 4th class as input for student, then your program must display a message
(“You have entered wrong class for the student! Please try again Thank you.”).
Good Luck
Page 4 of 4