CGPA CALCULATOR
PROJECT REPORT
                           Submitted by
   VIVAAN ANAND [Reg. No: RA2211003010791]
   RITHU NANDANA [Reg. No: RA2211003010766]
AMITHRAJITH PREMESH [Reg. No: RA2211003010811]
   JAPASH MOHAN [Reg. No: RA2211003010788]
                      Under the Guidance of
                        Dr.S.RAMESH
     Assistant Professor, Department of Computing Technologies
    In partial satisfaction of the requirements for the degree of
        BACHELOR OF TECHNOLOGY
                   in
    COMPUTER SCIENCE AND ENGINEERING
               SCHOOL OF COMPUTING
 COLLEGE OF ENGINEERING AND TECHNOLOGY
 SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
             KATTANKULATHUR - 603203
                            MAY 2023
  SRM INSTITUTION OF SCIENCE AND TECHNOLOGY
            KATTANKULATHUR-603203
                        BONAFIDE CERTIFICATE
Certified that this Project Report titled “CGPA CALCULATOR” is the bonafide
work    done     by   Vivaan       Anand[RA2211003010791],         Rithu   Nandana
[RA2211003010766] , Amithrajith Premesh[RA221103010811] and Japash
Mohan[RA2211003010788] who completed the project under my supervision.
Certified further, that to the best of my knowledge the work reported herein does
not form part of any other work.
SIGNATURE                                       SIGNATURE
Dr.S.Ramesh                                     Dr.M.Pushpalatha
OODP – Course Faculty                           Professor & Head
Assistant Professor                             Department of Computing Technologies
Department of Computing Technologies            School of Computing
SRMIST                                          SRMIST
                            TABLE OF CONTENTS
S.No                        CONTENTS            PAGE NO
                                                  4
1.     Problem Statement
                                                  5
2.     Modules of Project
                                                  6
3.     Diagrams
                                                  6
          a. Use case Diagram
                                                  7
          b. Class Diagram
                                                  8
          c. Sequence Diagram
                                                  9
          d. Collaboration Diagram
                                                  10
          e. State Chart Diagram
                                                  11
          f. Activity Diagram
                                                  12
          g. Package Diagram
                                                  13
          h. Component Diagram
                                                 14
          i. Deployment Diagram
                                                 15
4.     Code/Output Screenshots
                                                 21
5.     Conclusion
                                                  22
6.     References
                        PROBLEM STATEMENT
For this project we have decided to make a CGPA calculator using C++, that can
be very useful for college students. Students can easily find their CGPA by entering
the credit for each subject along with grade they scored for that subject. The
calculator is time efficient.
Generally, people struggle and make mistakes while calculating their CGPA, thus
our team have sought to produce an efficient calculator for the same. This will cut
down on the confusion and mistakes repeated during the process, thus being more
time efficient. For user-based input one can enter ‘n’ number of courses their
college offers, and their respective credits and grade procured. The program will
multiply the overall grade points by the credit of each subject by the total credit
scores. This will give out user’s CGPA score. This program is designed to evaluate
your CGPA score and give you standardised remark.
                        MODULES OF PROJECT
<iostream>: iostream stands for standard input-output stream. This header file
contains definitions of objects like cin, cout, cerr, etc.You use operators or iostream
member functions to insert data into a stream (output) or extract data from a stream
(input), and to control the format of data that you insert or extract.
<iomanip>:The iomanip is a library in C++ which helps us in manipulating the
output of any C++ program. There are many functions in this library that help in
manipulating the output. To name a few we have functions to reset flags, set fill
characters, set precision, get date and time, etc. It is a part of input-output library
of the C++ standard library.
For Loop : A for loop is a control flow statement for specifying iteration, which
allows code to be executed repeatedly. A for loop has two parts: a header
specifying the iteration, and a body which is executed once per iteration. The
header often declares an explicit loop counter or loop variable, which allows the
body to know which iteration is being executed. For loops are typically used when
the number of iterations is known before entering the loop. For loops can be
thought of as shorthands for while loops which increment and test a loop variable.
Switch…case:    It is the statement that allows a variable to be tested against a list of
values for equality. The value in the switch is termed as a case, and hence the
variable being switched on is checked against the case .The switch statement in
C++ is the best alternative to the lengthy if statements that are used to compare a
variable to different integral values. It is a multi-way branch statement. The switch
statement is the control statement that allows any value to change the control of
the execution
USE CASE DIAGRAM
CLASS DIAGRAM
SEQUENCE DIAGRAM
COLLABORATION DIAGRAM
STATE CHART DIAGRAM
ACTIVITY DIAGRAM
PACKAGE DIAGRAM
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
                                       CODE
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{ int width = 46; // Width of the box
 string f_name,s_name;
string regno;
cout<<"\t\t\t\t\t\t*******"<<endl;
cout<<"\t\t\t\t\t\t*CGPA CALCULATOR*"<<endl;
cout<<"\t\t\t\t\t\t*******"<<endl;
cout<<"Name:";
cin>>f_name>>s_name;
cout<<"Register No.:"<<regno;
cin>>regno;
   string sem;
   cout<<"Semester:";
   cin>>sem;
   string pro;
   cout<<"Programme:";
   cin>>pro;
   int num_courses;
   cout << "\t\t\t\t\t\n\nEnter the number of courses: ";
   cin >> num_courses;
  int total_credits = 0;
  float total_grade_points = 0;
for (int i = 1; i <= num_courses; i++)
{
  int credits;
  cout << "\t\t\t\t\tEnter credits for course " << i << ": ";
  cin >> credits;
  total_credits += credits;
  char grade;
  cout << "\t\t\t\t\tEnter grade for course " << i << " (A/B/C/D/E/F/G/H): ";
  cin >> grade;
  float grade_points;
  switch (grade)
  {
     case 'A':
        grade_points = 10;
        cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
        break;
     case 'B':
        grade_points = 9;
        cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
        break;
     case 'C':
        grade_points = 8;
        cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
        break;
     case 'D':
        grade_points = 7;
        cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
        break;
        case 'E':
        grade_points = 6;
        cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
        break;
          case 'F':
          grade_points = 5;
          cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
          break;
          case 'G':
          grade_points = 4;
          cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tPASS"<<endl;
          break;
           case 'H':
          grade_points = 0;
          cout<<"\n\t\t\t\t\t\t\t\t\t\t\t\tFAIL"<<endl;
          break;
        default:
          cout << "Invalid grade entered!" << endl;
          i--; // to repeat this iteration
          continue;
      }
      total_grade_points += grade_points * credits;
  }
   cout << "*";
   for (int i = 0; i < width - 2; i++) {
      cout << "*";
   }
   cout << "*" << endl;
   float cgpa = total_grade_points / total_credits;
   cout << fixed << setprecision(2) << "Cumulative Grade Point Average(CGPA)
: " << cgpa <<""<< endl;
     cout << "*";
   for (int i = 0; i < width - 2; i++) {
      cout << "*";
   }
   cout << "*" << endl;
   if(cgpa>=9.5){
      cout<<"\n\t\t\t\t\t\t\t\t\tOutstanding performance";
   }
else if(cgpa>=9.0){
   cout<<"\n\t\t\t\t\t\t\tExcellent performance";
}
else if(cgpa>=8.5){
   cout<<"\n\t\t\t\t\t\t\t\t\tGood performance";
}
else if(cgpa>=8){
   cout<<"\n\t\t\t\t\t\t\t\t\tCan be better";
}
else{
   cout<<"\n\t\t\t\t\t\t\t\t\tPoor Performance";
}
   return 0;
}
OUTPUT SCREENSHOT
                               CONCLUSION
The CGPA calculator C++ project is a great example of how programming can
simplify tedious tasks for students and solve real-world problems. It demonstrates
various programming concepts and offers an opportunity for beginners to gain
hands-on experience and develop their problem-solving skills. With some
modifications and enhancements, the project can be a valuable addition to any
student's portfolio, acting as proof of the power of programming in solving
practical problems. Overall, the CGPA calculator project is an excellent way to
showcase the potential of programming and its ability to make life easier for
students.
                     REFERENCES
✓ https://www.programiz.com/
✓ https://www.geeksforgeeks.org/
✓ https://www.javatpoint.com/
✓ https://www.w3schools.com
✓ https://www.geeksforgeeks.org
✓ Lucid chart Online UML diagram tool
✓ The C++ Programming Language (4th Edition) By Bjarne
  Stroustrup
✓ C++ Primer 5th Edition
✓ C++ Pocket Reference 1st Edition Accelerated C++: