OOP Project Report: On CGPA Calculator

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

OOP Project Report

On
CGPA Calculator

in
COMPUTER SCIENCE AND ENGINEERING

By

Irfan Ali

2020-Cuvas-0228

Cholistan University of Veterinary and Animal Sciences


Lovely Professional
University South Punjab
(Pakistan)
OBJECTIVE

For university students keeping track of their cgpa is pretty important so that
they can keep a balance between their academics and co-curricular activities
along with good marks thus its much difficult to keep on calculating again and
again the types and cgpa and hence this CGPA calculator helps to instantly
calculate the gpa and cgpa of a student based on certain inputs.
We have created a very user friendly project so that user can easily run through
it without any difficulty.

The major purpose of the project is to help students keep track of their grades
and markings. Also they can predict how much they have to score to keep the
desired cgpa for the year.
Calculation of GPA and cgpa have become much more easier through this
project the student are easily able to know the grading system.

It is very difficult work to calculate GPA and CGPA. We have to make a


lot of math in have to do. Due to which the answer is sometimes wrong.
We have solved this problem in this project. This project is used to
overcome the entire problem which are facing currently. We can easily
calculate GPA and CGPA with the help of formula in this project.

INTRODUCTION
OOP is a high-level programming language with annotated, object-
oriented, dynamic vocabulary. OOP emphasizes the ability to read simple,
easy-to-learn syntax and therefore reduces program maintenance costs.
Often, programmers fall in love with OOP because of the increased
productivity it provides. Built-in modules (written in C++) that provide
access to system functionality such as File I / O that would otherwise be
inaccessible to OOP programmers, as well as modules written in OOP that
are used daily Provides standard solutions to many programming
problems.OOP installers for the Windows platform usually include the
entire standard library and often include several additional components.
Both GPA (Grade Point Average) and CGPA (Cumulative Grade Point
Average) are used across several boards and universities for calculating,
assessing, and grading academic performance. This project will describe
the GPA and cgpa calculating system. Its functionalities are to first take
the credit and subject’s points of the subjects. And we give semester wise
GPA in it and calculating CGPA. It is very easy to use and get GPA and
CGPA from this project.

In this project we have made a GUI interface to calculate CGPA by


taking all the details from the student like Grades, Credits and subjects for
different semesters. In this GUI we have also shown a separate area with
grading points which will tell user about how points are being assigned to
each and every grade. This GUI project will help many universities and
Colleges as it is simple to use and its User Interface is very user friendly.
Source code
from tkinter import *
win=Tk()
win.title("CGPA CAlLCULATOR")
win.geometry("1000x600")
win.resizable(0,0)
#canvas
'''canvas= Canvas(win,width=1000,height=600,bg="")
canvas.pack()'''

#name
aLabel=Label(win,text="NAME")
aLabel.place(x=50,y=50)

name=StringVar()
txtbox1=Entry(win,textvariable=name,width=25,bd=5)
txtbox1.place(x=120,y=50)

#reg num
bLabel=Label(win,text="REG NUM")
bLabel.place(x=50,y=90)
reg=IntVar()
#reg=''
txtbox2=Entry(win,textvariable=reg,width=25,bd=5)
txtbox2.place(x=120,y=90)

#semester
cLabel=Label(win,text="SEMESTER 1",font=("Algerian",16))
cLabel.place(x=450,y=50)

dLabel=Label(win,text="SEMESTER 2",font=("Algerian",16))
dLabel.place(x=750,y=50)

#grade points
calm=Label(win,text="To Know Grade Points:")
calm.place(x=50,y=150)
def click():
t=Text(win,relief=GROOVE,state=NORMAL,bd=3,width=30,height=2
0)
t.insert(END,"\n O :Grade Point-10\n\n A+ :Grade Point-9\n\n A
:Grade Point-8\n\n B+ :Grade Point-7\n\n B :Grade Point-6\n\n C+
:Grade Point-5\n\n C :Grade Point-4\n\n E :Reappear- Grade Point-0\n\n
F :Fail- Grade Point-0")
t.place(x=50,y=200)
t.configure(state=DISABLED)#user wont be able to modify content
calb=Button(win,text="Click
Me",relief=RIDGE,bd=5,state=ACTIVE,command=click)
calb.place(x=200,y=150)
#reset

def reset():
r=Text(win,relief=GROOVE,state=NORMAL,bd=3,width=30,height=2
0)
r.insert(END,"\n All Values are back to\n default values")
r.place(x=50,y=200)
#set all values to default

#sem1
#grades
s1s1grad1.set('')
s1s2grad2.set('')
s1s3grad3.set('')
s1s4grad4.set('')
s1s5grad5.set('')
s1s6grad6.set('')
#credits
s1s1cred1.set(0)
s1s2cred2.set(0)
s1s3cred3.set(0)
s1s4cred4.set(0)
s1s5cred5.set(0)
s1s6cred6.set(0)
tgpamrk1=0

#sem2
#grades
s2s1grad1.set('')
s2s2grad2.set('')
s2s3grad3.set('')
s2s4grad4.set('')
s2s5grad5.set('')
s2s6grad6.set('')
#credits
s2s1cred1.set(0)
s2s2cred2.set(0)
s2s3cred3.set(0)
s2s4cred4.set(0)
s2s5cred5.set(0)
s2s6cred6.set(0)
tgpamrk2=0

cgpamrk=0
reset=Button(win,text="Reset",relief=RIDGE,bd=5,command=reset)
reset.place(x=120,y=550)

#sem2

subjects2=Label(win,text="Subjects",font=("Times New Roman",13))


subjects2.place(x=670,y=100)

#sem2 subjects

sem2sub1=Label(win,text="Subject 1")
sem2sub1.place(x=670,y=150)

sem2sub2=Label(win,text="Subject 2")
sem2sub2.place(x=670,y=200)

sem2sub3=Label(win,text="Subject 3")
sem2sub3.place(x=670,y=250)
sem2sub4=Label(win,text="Subject 4")
sem2sub4.place(x=670,y=300)

sem2sub5=Label(win,text="Subject 5")
sem2sub5.place(x=670,y=350)

sem2sub6=Label(win,text="Subject 6")
sem2sub6.place(x=670,y=400)

#sem2 grades
sem2grad=Label(win,text="Grades",font=("Times New Roman",13))
sem2grad.place(x=770,y=100)

s2g1=StringVar()
s2s1grad1=Combobox(win, textvariable=s2g1,
state='readonly',width=7)
s2s1grad1['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s1grad1.place(x=770,y=150)

s2g2=StringVar()
s2s2grad2=Combobox(win, textvariable=s2g2,
state='readonly',width=7)
s2s2grad2['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s2grad2.place(x=770,y=200)

s2g3=StringVar()
s2s3grad3=Combobox(win, textvariable=s2g3,
state='readonly',width=7)
s2s3grad3['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s3grad3.place(x=770,y=250)

s2g4=StringVar()
s2s4grad4=Combobox(win, textvariable=s2g4,
state='readonly',width=7)
s2s4grad4['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s4grad4.place(x=770,y=300)

s2g5=StringVar()
s2s5grad5=Combobox(win, textvariable=s2g5,
state='readonly',width=7)
s2s5grad5['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s5grad5.place(x=770,y=350)
s2g6=StringVar()
s2s6grad6=Combobox(win, textvariable=s2g6,
state='readonly',width=7)
s2s6grad6['values']=('O','A+','A','B+','B','C+','C','E','F')
s2s6grad6.place(x=770,y=400)

#sem2 credits
sem2cred=Label(win,text="Credits",font=("Times New Roman",13))
sem2cred.place(x=870,y=100)

s2c1=IntVar()
s2s1cred1=Combobox(win, textvariable=s2c1,
state='readonly',width=7)
s2s1cred1['values']=(1,2,3,4)
s2s1cred1.place(x=870,y=150)

s2c2=IntVar()
s2s2cred2=Combobox(win, textvariable=s2c2,
state='readonly',width=7)
s2s2cred2['values']=(1,2,3,4)
s2s2cred2.place(x=870,y=200)

s2c3=IntVar()
s2s3cred3=Combobox(win, textvariable=s2c3,
state='readonly',width=7)
s2s3cred3['values']=(1,2,3,4)
s2s3cred3.place(x=870,y=250)

s2c4=IntVar()
s2s4cred4=Combobox(win, textvariable=s2c4,
state='readonly',width=7)
s2s4cred4['values']=(1,2,3,4)
s2s4cred4.place(x=870,y=300)

s2c5=IntVar()
s2s5cred5=Combobox(win, textvariable=s2c5,
state='readonly',width=7)
s2s5cred5['values']=(1,2,3,4)
s2s5cred5.place(x=870,y=350)

s2c6=IntVar()
s2s6cred6=Combobox(win, textvariable=s2c6,
state='readonly',width=7)
s2s6cred6['values']=(1,2,3,4)
s2s6cred6.place(x=870,y=400)
txtbox1.focus()
win.mainloop()

Screenshots of gui
Save button to save data
zz
Text box as a Resets all data Calculates tgpa
communicator

Gives remarks based on cgpa


GUI AS A WHOLE

RESULT

Through this project the students would be able to easily calculate their
tgpas and cgpa in a faster and easier manner and as developers we were
also able to learn the features of python programming language and also
understand the working of the graphical user interface how to use the
tkinter library to make one and the SQLite3 for the database which act as a
storage system in the backend for our project.
We were also able to come up with certain new ideas which we have
implemented in our project. By making this project we have explored the
vast field of python programming language and were able to use our
theoretical knowledge in a practical project which has helped us in
understanding the concepts far better than any bookish knowledge.

Load Button functionality

Reset Button functionality


This is how our working project looks at final stage.
REFERENCE

Books:
 Introduction to Programming Using Python - Y.
Liang
 Head-First Python, 2nd edition
 Python Cookbook

Websites:

 https://stackoverflow.com
 https://www.geeksforgeeks.org/python-
programming-language
 https://www.tutorialspoint.com/python/python_gui
_programming.htm

You might also like