You are on page 1of 19

KOLEJ PENGKOMPUTERAN INFORMATIK DAN MEDIA

GROUP ASSIGNMENT

CSC121: INTRODUCTION TO ALGORITHM DESIGN AND DEVELOPMENT

TITLE:

STUDENT’S GPA AND CGPA CALCULATOR

PREPARED BY:

No. NAME MATRIX NO


1. ZACKWAN HAKIMI BIN ALI 2023160109
2. MUHAMMAD ASRI BIN NAZUL 2023135519
3. MOHAMAD KHAIRUL ZAINAL BIN JOHNNY FOO 2023374573
TAU FEN @ MOHD ZAIN

PREPARED FOR:

PUAN NASRAH BINTI NAHARU

DATE OF SUBMISSION: 3 JULY 2023


Table of Contents
1.0 INTRODUCTION .............................................................................................................. 2
2.0 OBJECTIVE OF THE PROJECT ..................................................................................... 3
3.0 PROBLEM ANALYSIS ..................................................................................................... 4
Table 3.1 Input Process Output Table ................................................................................ 4
4.0 SOLUTION ....................................................................................................................... 5
4.1 Pseudocode ................................................................................................................. 5
Figure 4.1.1 Main ............................................................................................................ 5
Figure 4.1.2 Display Grade Table Function ..................................................................... 5
Figure 4.1.3 Calculate GPA ............................................................................................ 6
Figure 4.1.4 Calculate CGPA .......................................................................................... 7
4.2 Flowchart ..................................................................................................................... 8
Figure 4.2.1 Main ............................................................................................................ 8
Figure 4.2.2 Grade table Flowchart ................................................................................ 9
Figure 4.2.3 GPA calculation ........................................................................................... 9
Figure 4.2.4 CGPA calculation ...................................................................................... 10
5.0 SAMPLE EXPECTED OUTPUT ..................................................................................... 11
Figure 5.1 Main ................................................................................................................. 11
Figure 5.2 Display Grade Table ........................................................................................ 11
Figure 5.3 Calculate GPA ................................................................................................. 11
Figure 5.4 Calculate CGPA .............................................................................................. 11
6.0 DISCUSSION .................................................................................................................. 12
7.0 CONCLUSION ................................................................................................................ 13
8.0 REFERENCES ............................................................................................................... 14
APPENDIX ............................................................................................................................ 15
SCORING RUBRICS (REPORT) ...................................................................................... 15
SCORING RUBRICS (PRESENTATION) ......................................................................... 17

1
1.0 INTRODUCTION

Calculating a student’s Grade Point Average (GPA), Cumulative Grade Point Average
(CGPA), and overall percentage is a fundamental aspect of assessing academic performance.
How ever this process can sometimes be challenging and sometimes led to errors. In this
introduction, we have explored some issues that faced by students and create a solution to
solve the problem.

Usually, calculating GPA, CGPA and percentage was a manual and time consuming.
Sometimes it can be confusing and errors will occur especially with lots number of courses.
Thus, the development of the solution that calculate GPA, CGPA and percentage is crucial.
By using our solution, students can save time and reduce errors that may happen from manual
calculations.

More over in today’s digital age, it’s important for solutions to be easy to use and
accessible, so that students can quickly access to their latest academic information. Creating
a solution that works well can improve how GPA, CGPA and percentage calculation are done.
The process will be simpler and give students instant access to the right information.

In conclusion, GPA, CGPA and percentage calculation is important for accurately


assessing students’ academic performance. By making the process easier, we have created
effective solutions that give reliable evaluations. Simplifying this solution not only helps
students, but also makes it easier for lectures and administrators to make efficient decisions.

2
2.0 OBJECTIVE OF THE PROJECT

1) Design a solution that will:


i. Display Grade Table
ii. Calculate GPA (Grade Point Average) based on their academic grade point and
credit hours.
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 =
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ℎ𝑜𝑜𝑜𝑜𝑜𝑜

iii. Calculate CGPA (Cumulative Grade Point Average) based on their cumulative
academic grade point and cumulative credit hours.
𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 =
𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ℎ𝑜𝑜𝑜𝑜𝑜𝑜

2) Provide an efficient and accurate method for calculating students’ academic results,
by allowing for user-friendly evaluation and comparison. This project will help students
calculate their GPA, and CGPA without any mistakes and display the right output from the user
prompt.

3) Prepare students with the right tools to accurately calculates their GPA, and CGPA as
well as provide them with a visual representation of their grades through a grade table, this
will make a better understanding of their academic progress and performance, enabling
students to make decisions and take steps toward their educational and career goals clear
and better.

3
3.0 PROBLEM ANALYSIS

Problem analysis is called the definition phase. The problem is defined to obtain a clear
understanding of the problem requirement. Here is the process to solve this problem in the
table below:

Input Process Output


Input Variable: Process items: Output variable:
• service • calculate_GPA • display_grade_table
• grade • calculate_CGP • total_grade_point
• credit • total_credit
• semester Formula GPA: • gpa
• grade_point • total_grade_point += • cgpa
• credit grade_point*
credit_hour
• total_credit += credit
• gpa = _grade_point /
total_credit

Formula CGPA:
• total_grade_point +=
grade_point
• total_credit += credit
• cgpa = total_grade_point /
total_credit

Step/Solution:
1. Get input (From keyboard)
2. Set grade (In CPU and Memory)
3. Calculate total_grade_point (In CPU
and Memory)
4. Calculate total_credit (In CPU and
Memory)
5. Calculate gpa and cgpa (In CPU
and Memory)
6. Display output (To monitor/screen
console)
Table 3.1 Input Process Output Table

4
4.0 SOLUTION

The solution for this problem is developed using two methods, which is pseudocode
and flowchart.
4.1 Pseudocode

Pseudocode is a method of writing down the steps of a solution using plain English or
a combination of English and programming language concepts. It helps you plan and design
solutions without worrying about programming language specific syntax rules.

BEGIN
DECLARE service, continue;
LOOP START
DISPLAY "Choose Service: ";
DISPLAY "[1] Display Grade Table";
DISPLAY "[2] Calculate GPA";
DISPLAY "[3] Calculate CGPA";
READ service;
IF service == 1
CALL FUNCTION Display_grade_table;
IF service == 2
CALL FUNCTION Calculate_GPA
IF service == 3
CALL FUNCTION Calculate_CGPA
DISPLAY "Do you want to do another service? (Y/N)"
IF continue == 'Y' || continue == 'y'
DO LOOP
ELSE
LOOP END
END
Figure 4.1.1 Main

Based on Figure 4.1.1 Main, the solution starts by asking the user to choose a service
that they wanted. If the user inputs number greater than 0, the solution will proceed with
displaying grade table, calculation of GPA, CGPA and then print out all the desired output. It
depends on which service the user pick. If the user inputs a number less than 0 or a number
more than 3, the solution will instead print out a message saying “Invalid prompt”. After that, it
will display “Do you want to do another service? (Y/N). And the solution will continue the loop
until the user prompt letter other than y or Y.

BEGIN
FUNCTION Display_grade_table
INPUT Display Grade table
FUNCTION END
END
Figure 4.1.2 Display Grade Table Function

Based on Figure 4.1.2 Display Grade Table Function, if the user prompt in number 1,
a grade table will be displays. User-friendly interface will display a comprehensive grade table.
This table will enable students to easily interpret and understand the grading scale.

5
BEGIN
FUNCTION Calculate_GPA
DECLARE grade, another_subject, grade_point, total_grade_point, gpa,
credit, total_credit;
LOOP START
DISPLAY "Please enter your grade"
READ grade;
IF grade == "A+" || grade "A"
grade_point = 4.00
IF ELSE grade == "A-"
grade_point = 3.67
IF ELSE grade == "B+"
grade_point = 3.33
IF ELSE grade == "B"
grade_point = 3.00
IF ELSE grade == "B-"
grade_point = 2.67
IF ELSE grade == "C+"
grade_point = 2.33
IF ELSE grade == "C"
grade_point = 2.00
IF ELSE grade == "C-"
grade_point = 1.67
IF ELSE grade == "D+"
grade_point = 1.33
IF ELSE grade == "D"
grade_point = 1.00
IF ELSE grade == "E"
grade_point = 0.67
IF ELSE grade == "F"
grade_point = 0.00
ELSE
DISPLAY "Invalid Input"
DO LOOP
DISPLAY "Please enter credit hour for this subject: "
READ credit;
CALCULATE
total_grade_point += grader_point*credit_hour
total_credit +=credit
DISPLAY "Do you want to input another subject? (Y/N)";
READ another_subject;
IF another_subject == 'Y' || another_subject == 'y'
DO LOOP
ELSE
LOOP END
CALCULATE gpa = total_grade_point / total_credit
DISPLAY "Your Total Grade point for this semester is ",
total_grade_point;
DISPLAY "Your total credit hour for this semester is" ,
total_credit;
DISPLAY "Your GPA for this semester is: ", gpa;
FUNCTION END
END
Figure 4.1.3 Calculate GPA

Based on Figure 4.1.3 Calculate GPA, if the user prompt number 2, the solution will
ask the user to enter their grade and credit hours. Then, a calculation algorithm will run and
accurately calculates a student’s GPA based on the grades and credit hours obtained in

6
individual courses. It will continue until the user prompt letter other than y or Y. And it will print
out the user’s total grades, credits and GPA.

BEGIN
FUNCTION Calculate_CGPA
DECLARE semester, count = 1, grade_point, total_grade_point,
credit, total_credit, cgpa
DISPLAY "Please enter how many semester you have ".
READ semester;
LOOP START
DISPLAY "Please enter your Total Grade Point for Semester" ,
count,
READ grade_point
DISPLAY "Please enter your Total Credit Hour for Semester ",
count,
READ credit
CALCULATE
total_grade_point += grade_point
total_credit += credit
count++
IF count <= semester
DO LOOP
ELSE
LOOP END
CALCULATE
cgpa = total_grade_point/total_credit
DISPLAY "Your Total Grade point for all your semester is ",
total_grade_point
DISPLAY "Your total credit hour for all your semester is ",
total_credit
DISPLAY "Your CGPA is: ", cgpa;
FUNCTION END
END
Figure 4.1.4 Calculate CGPA

Based on Figure 4.1.4 Calculate CGPA, If the user prompt in number 3. Then, the
CGPA (Cumulative Grade Point Average) calculation, which represents the average GPA
achieved over multiple semesters or academic sessions. The solution will accumulate the
individual GPAs from each semester and calculate the overall CGPA. After that, it will display
the user’s total grade point, credit hours and CGPA.

7
4.2 Flowchart

A flowchart is a diagram that uses shapes and arrows to represent the flow of a
solution. It provides a visual representation of the steps in the process, making it easier to
understand and follow

Figure 4.2.1 Main

In Figure 4.2.1 Main, the solution starts by asking the user to choose a service that
they wanted. If the user inputs number greater than 0, the solution will proceed with displaying
grade table, calculation of GPA, CGPA and then print out all the desired output. It depends on
which service the user pick. If the user inputs a number less than 0 or a number more than 3,
the solution will instead print out a message saying “Invalid prompt”. After that, it will display
“Do you want to do another service? (Y/N). And the solution will continue the loop until the
user prompt letter other than y or Y.

8
Figure 4.2.2 Grade table

In Figure 4.2.2 Grade table, if the user prompt in number 1, a grade table will be
displays. User-friendly interface will display a comprehensive grade table. This table will
enable students to easily interpret and understand the grading scale.

Figure 4.2.3 GPA calculation

In Figure 4.2.3 GPA calculation, if the user prompt number 2, the solution will ask the
user to enter their grade and credit hours. Then, a calculation algorithm will run and accurately
calculates a student’s GPA based on the grades and credit hours obtained in individual

9
courses. It will continue until the user prompt letter other than y or Y. And it will print out the
user’s total grades, credits and GPA.

Figure 4.2.4 CGPA calculation

In Figure 4.2.4 CGPA calculation, If the user prompt in number 3. Then, the CGPA
(Cumulative Grade Point Average) calculation, which represents the average GPA achieved
over multiple semesters or academic sessions. The solution will accumulate the individual
GPAs from each semester and calculate the overall CGPA. After that, it will display the user’s
total grade point, credit hours and CGPA.

10
5.0 SAMPLE EXPECTED OUTPUT

Figure 5.1 Main

Figure 5.2 Display Grade Table

Figure 5.3 Calculate GPA

Figure 5.4 Calculate CGPA

11
6.0 DISCUSSION

Topics to be discuss about this solution is finding from the solution, limitation of the
solution, and improvement to suggest.

1) Findings from the solution

The solution that had been developed is sufficient to solve the problem which is
calculating GPA (Grade Point Average) and CGPA (Cumulative Grade Point Average) by
calculating the GPA (Grade Point Average) and CGPA (Cumulative Grade Point Average).

2) Limitation of the solution

The solution has several flaws that it is unable to accurately calculate GPA and CGPA
if the user wants to input grades using marks. The solution only uses a limited set of grades
(A+, A, A-, B+, B, B-, C+, C, C-, D+, D, E, F) and assigns fixed grade points to each grade.

3) Improvement to suggest

i) Allow custom grade mapping, instead of fixed grade points.

ii) Allow users to define their own grade mapping, where they can assign grade points
based on the marks or grading scale used in their educational institution.

12
7.0 CONCLUSION

1) Whether the solution is achievable in programming

The solution suggested is achievable in programming because the problem is simple


and doesn’t have many obstacles to solve.

The suggested improvements to address the flaws in the solution and enable GPA and
CGPA calculations based on user-provided marks are achievable in programming. These
improvements involve modifying the solution to incorporate input validation, custom grade
mapping, credit hour mapping, and revising the calculation logic for GPA, CGPA. These
improvements can be implemented using programming concepts such as conditionals, loops,
data structures, and function. By making these changes, the solution will be able to handle
user input, adjust different grading systems, and accurately calculate GPA and CGPA.

2) How the algorithm representation benefits on the problem solving

Algorithm representation, which refers to systematic and structured way of presenting


a solution to a problem, provides several benefits for problem solving. Algorithm
representation helps in clearly organizing the steps involved in solving a problem. It breaks
down the problem into smaller, manageable steps, making it easier to understand and follow
the solution process. Then, algorithms are typically presented using a standardized notation,
such as pseudocode or flowcharts, which enhances readability and facilitates effective
communication between developers. A well-represented algorithm can be easily understood
and shared among team members, aiding collaboration. Lastly, by representing a solution
algorithmically, it becomes easier to identify errors or flaws in the logic. The step-by-step
breakdown allows for systematic analysis and debugging of the code, making it more efficient
to identify and rectify any issues.

13
8.0 REFERENCES

Ismail, J. (n.d.). Chapter 3: Selection Control Structure. In CSC126 Fundamentals of


Algorithms & Computer Problem Solving.
Morley, D., & Parker, C. S. (2016). Understanding Computers: Today and Tomorrow,
Comprehensive. In Google Books. Cengage Learnin

14
APPENDIX

SCORING RUBRICS (REPORT)

No
Attributes Sub-attribute Poor Fair Good Excellent Weight
Submission Marks

0 1 2 3 4

No Poor use of white White space makes Good use of white Excellent use of
Submission space (indentation, solution fairly easy to space. white space.
blank lines). read.
Sufficiently organized Creatively organized
Disorganized and Partially organized work. work.
Pseudocode Readability 3
messy. work.
Good use of variables Excellent use of
Poor use of variables Fairly use of variables and control structures. variables control
and control and control structures.
structures. structures.

No The flowchart is The flowchart is The flowchart is fairly The flowchart is


Submission poorly organized and readable only by easy to read. exceptionally well
very difficult to read. someone who knows organized and very
what it is supposed to The flowchart shapes easy to follow.
Flowchart Readability The flowchart shapes be doing. are sufficiently presented 3
are wrongly The flowchart
presented The flowchart shapes shapes are well
are partial wrongly presented
presented

No A difficult and A logical solution, Solution is efficient and Solution is efficient,


Submission inefficient solution. easy to follow but not easy to follow (i.e. no easy to understand
the most efficient. confusing tricks). and maintain.
Does not included
required control Partially or does not Included required control Included required
structures. include required structures. control structures.
Algorithm Efficiency control structures. 2
The algorithm was Fits a reasonable length Fits a reasonable
lengthy The algorithm was of algorithm. length of algorithm.
lengthy.
No Does not present any Executes with some Executes without errors. Executes without
Submission due to errors. errors. errors.
User prompts are
User prompts are User prompts contain understandable, Excellent user
misleading or non- little information, poor minimum use of symbols prompts, good use
existent. design. or spacing in output. of symbols or
Algorithm Logic spacing in output 2
No testing has been Some testing has Some testing has been (neatly displayed).
completed. been completed. completed and present
appropiate solution. Testing has been
completed and
present appropiate
solution.

Formatting No formatting Poor report formatting Fairly good report Good report formatting. Excellent report
with unorganized formatting. formatting. Follow
content. the documentation
References are included. format with an
Major grammatical appropriate 1
error. References aprroiate
arrangement and
to the requirement
Minor grammatical error. fulfilled
No references
requirements.
Documentatio included.
n/Project
Report Algorithm No Poor explanation of Fairly good Good explanation of Excellent
(Pseudocode & Submission algorithm which does explanation of algorithm based on explanation of
Flowchart) not reflex the problem algorithm based on problem statement and algorithm based on 1
statement and problem statement solving. problem statement
solving. and solving. and solving.

Discussion & No Unrelated discussion Fairly good Good and logical Well thought-out and
Conclusion Submission and conclusion discussion and discussion and logical discussion 1
conclusion conclusion and conclusion.

TOTAL
52

16
SCORING RUBRICS (PRESENTATION)

Attributes Sub-attribute No Submission Poor Fair Good Excellent Weight Marks

0 1 2 3 4

No Presentation There are a few errors There are no errors


There are many There are some errors
in spelling, grammar, in spelling,
errors in spelling, in spelling, grammar,
and punctuation. grammar, and
grammar, and and punctuation.
punctuation.
punctuation.
Bullet format is not
Readability of Bullet format is not
consistent on a few Bullets are 2
the Slides Bullet format is not consistent on some
slides. consistent and clear.
consistent or clear. slides.
Too much information Information is clear
Too much information Too much information
on less than five and concise on each
on many slides. on some slides.
slides. slide.

No Presentation Background makes


Appealing graphic
the slides hard to
Graphic elements are elements are
read. There are too few
included sufficiently. included
Graphics are graphic elements.
Overall visual Only one slides is hard appropriately. Slides
confusing and not Appropriate 2
Appeal to read and movement are easy to read and
related to words. background. Some
and sounds are used movement and
Too much movement slides hard to read.
quite effectively. sounds are used
Presentation in the slides. Many
effectively.
slides hard to read.

All presenters knew


the information and
progressed
smoothly through
No Presentation Three or more of the
Two of the presenters One presenter didn't the presentation.
presenters didn't Diction and voice
didn't know the know the information
know the information level engaged the
information and got lost and they got lost often.
and got lost often. audience in the
often. Diction and voice Diction and voice level
Presentation Diction and voice presentation. Role
level made listening made listening difficult 2
Skills level made listening playing enhanced
difficult. Role playing from for the audience.
difficult. Role playing the information and
distracted audience Role playing distracted
distracted audience
attention from the audience attention
attention from the
presentation from presentation.
presentation

held the audience


attention.

17
Information and Presents findings with Presents findings in
Presents findings in an
Organization graphics are some degree of an organized and 2
No Presentation organized manner
disorganized organization conclusive manner

Does not perform


Perform assigned Perform assigned Perform assigned
assigned tasks Perform assigned tasks
Work tasks within the scope tasks within the scope tasks beyond the
within the scope of within the scope of work 2
Responsibility of work with close of work and exceeds scope of work and
work even with and meet expectations
supervision expectations beyond expectations
close supervision

Has a
Ethics & Has a less Has a well-
disharmonious
Professionalism harmonious Has a satisfactory Has a good acknowledged
relationship with co-
relationship with co- relationship with co- relationship with co- relationship with co-
workers and within
workers and within workers and within workers and within workers and within
Work Relation institution, work, 2
institution, work, institution, work, groups institution,work, groups institution, work,
groups and
groups and and community when at and community when groups and
community when at
community when at work at work community when at
work
work work

TOTAL
48

18

You might also like