Gpa evaluation system through array.. need help urgent

Programming Fundamentals
Assignment Type: Individual Programming Assignment, Deadline: 21/05/2013, Marks: 20
Submission Mode: Soft copies (source code + exe file) of the solution.

Problem Statement: Computerized GPA Evaluation System using Array
You are required develop a computerized GPA evaluation system of your class using array. The basic idea is to calculate the GPA (Grade Point Average) of each subject and then calculate the GPA of whole semester of all the students of the class and on the basis of that GPA calculate the grade and remarks of each student of the class. Suppose that the total students of the class are 50. Your system must also provide the facility of the following:
1. Searching a student result according to his/her roll number.
2. Updating the obtained marks of the students in case of any mistake in entering marks.
3. Display the result of student who is the topper of the class
4. Display the result of the student who got minimum CGPA out of the class.
5. Display how many number of students got greater than or equal to 3.0 CGPA.
6. Display how many number of students got greater than or equal to 2.00CGPA and less than 3.00.
7. Display the total number of students who got A grade in the semester.
8. Display the total number of students who got B grade in the semester.
9. Display the total number of students who got C grade in the semester.
10. Display the total number of students who got F grade in the semester.
Detailed Description:
You are required to take the student’s marks for four subjects (Programming fundamentals, Calculus, English and Computing) as input from the user at runtime. After that calculate the GPA of each subject and the whole semester. Assume that total marks of a subject are 100 and each subject is of 3 credit hours except programming fundamentals. Programming fundamentals subject has 4 credit hours.
Complete Assessment system is given below in the table:
S.# Percentage (%) Grade GPA Remarks
1 85-100 A 4 Excellent
2 80-84 A- 3.75 Very Good
3 75-79 B+ 3.50 Good
4 70-74 B 3.0 Satisfactory
5 65-69 C+ 2.50 Above Average
6 60-64 C 2.0 Average
7 55-59 D+ 1.50 Pass
8 50-54 D 1.0 Just Pass
9 Below 50 F 0 Fail
Table: Assessment Scheme
• Percentage of a subject = (obtained marks / total marks) * 100. Percentage helps us to find the grade of the student.
• GPA of whole semester = multiply GPA of each subject according to the percentage of obtained marks by the number of credit hours for that course, sum up the GPA of all the subjects, and then divide this sum by the total number of credit hours taken in semester.
For example suppose the GPA in subject X is 2.5, in subject Y 2.6, and in subject Z is 3. Assuming that each subject is of 3 credit hours then GPA of whole semester will be calculated as:
GPA= (3 * (2.5 + 2.6 + 3)) / 9
GPA= 2.7
On the basis of Semester GPA, you have to give grade and remarks to the student. You have to study the above table for other types of remarks according to grade.
• If a student has less than 50 marks in a subject, a message should display that “you have to repeat this subject “.
***************************************************
code till now
***************************************
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
main()
{

char a,b,c,d;

char name[20];
float pf[3] ;
float comp[3];
float cal[3] ;
float eng[3] ;
float avg1[3] ;
float avg2[3] ;
float avg3[3] ;
float avg4[3] ;
float gpa1[3] ;
float gpa2[3] ;
float gpa3[3] ;
float gpa4[3] ;
float sgpa[3] ;
int f1=0;
int f3=0;
int f4=0;
int f5=0;
int f2=0;
for(int i=0;i<2;i++)
{
cout<<"Enter the record of student no."<<i<<endl;
cout<<"enter name....";
cin.getline(name,20);
cout<<"enter the marks of pf..............:";
cin>>pf[i];
cout<<"enter the marks of computing.......:";
cin>>comp[i];
cout<<"enter the marks of calculus........:";
cin>>cal[i];
cout<<"enter the marks of english.........:";
cin>>eng[i];
cin.ignore();
clrscr();
}
for(int j=0;j<2;j++)
{
avg1[j]=(pf[j]/100)*100;
avg2[j]=(comp[j]/100)*100;
avg3[j]=(cal[j]/100)*100;
avg4[j]=(eng[j]/100)*100;
cout<<"name\t"<<name<<endl;
cout<<"S#.\tsubject\t ObtainMarks\tPercentage (%)\t Grade\t GPA"<<endl;
cout<<"1\tprograming\t "<<pf[j]<<" \t\t" <<avg1[j]<<"\t "<<a<<"\t"<<gpa1[j]<<"\t"<<endl;
cout<<"2\tcomputing \t "<<comp[j]<<" \t\t" <<avg2[j]<<"\t "<<b<<"\t"<<gpa2[j]<<"\t"<<endl;
cout<<"3\tcalculus \t "<<cal[j]<<" \t\t" <<avg3[j]<<"\t "<<c<<"\t"<<gpa3[j]<<"\t"<<endl;
cout<<"4\tenglish \t "<<eng[j]<<" \t\t" <<avg4[j]<<"\t "<<d<<"\t"<<gpa4[j]<<"\t"<<endl;
sgpa[j]=((3*gpa2[j])+(3*gpa3[j])+(3*gpa4[j])+(4*gpa4[j]))/13;
cout<<"Total smester gpa is ...........:"<<sgpa[j]<<endl;
if(sgpa[j]<=4.00 || sgpa[j]>3.75)
{
f3++;
}
else if(sgpa[j]<3.50 || sgpa[j]>=3.00)
{
f4++;
}
else if(sgpa[j]<2.50 || sgpa[j]>=2.00)
{
f5++;
}
if(a=='F')
{
cout<<" you have to repeat pf "<<endl;
}
if(b=='F')
{
cout<<" you have to repeat computing "<<endl;
}
if(c=='F')
{
cout<<" you have to repeat calculus "<<endl;
}
if(d=='F')
{
cout<<" you have to repeat english "<<endl;
}
}
for(int k=0;k<2;k++)
{
if(sgpa[k]>3.00 || sgpa[k]==3.00)
{
f1++;
}
else if(sgpa[k]<3.00 || sgpa[k]==2.00)
{
f2++;
}
}
cout<<"\n\nTHE number of student who got gpa greter than 3 is"<<f1<<endl;
cout<<"\n\nTHE number of student who got gpa greter than 2 is"<<f2<<endl;
cout<<"\n\nTHE number of A grade is..........:"<<f3<<endl;
cout<<"\n\nTHE number of B grade is .........:"<<f4<<endl;
cout<<"\n\nTHE number of C grade is .........:"<<f5<<endl;
getch();
}
Please reply..
ill repost your code, if you want to post code in a forum you have to press the "Source code" tagged button in the Format: button box. The symbol of the button is <> once you press it two blocks appear as {code} {/code} just with [] brackets, and anything you type between the two will apear in the format of code with all the indentation intact.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#include<fstream.h>
 #include<conio.h>
 #include<stdio.h>
 #include<string.h>
 main()
 {
 
char a,b,c,d;
 
char name[20];
 float pf[3] ;
 float comp[3];
 float cal[3] ;
 float eng[3] ;
 float avg1[3] ;
 float avg2[3] ;
 float avg3[3] ;
 float avg4[3] ;
 float gpa1[3] ;
 float gpa2[3] ;
 float gpa3[3] ;
 float gpa4[3] ;
 float sgpa[3] ;
 int f1=0;
 int f3=0;
 int f4=0;
 int f5=0;
 int f2=0;
 for(int i=0;i<2;i++)
 {
    cout<<"Enter the record of student no."<<i<<endl;
    cout<<"enter name....";
    cin.getline(name,20);
    cout<<"enter the marks of pf..............:";
    cin>>pf[i];
    cout<<"enter the marks of computing.......:";
    cin>>comp[i];
    cout<<"enter the marks of calculus........:";
    cin>>cal[i];
    cout<<"enter the marks of english.........:";
    cin>>eng[i];
    cin.ignore();
    clrscr();
 }

 for(int j=0;j<2;j++)
 {
    avg1[j]=(pf[j]/100)*100;
    avg2[j]=(comp[j]/100)*100;
    avg3[j]=(cal[j]/100)*100;
    avg4[j]=(eng[j]/100)*100;
    cout<<"name\t"<<name<<endl;
    cout<<"S#.\tsubject\t ObtainMarks\tPercentage (%)\t Grade\t GPA"<<endl;
    cout<<"1\tprograming\t "<<pf[j]<<" \t\t" <<avg1[j]    <<"\t "<<a<<"\t"<<gpa1[j]<<"\t"<<endl;
    cout<<"2\tcomputing \t "<<comp[j]<<" \t\t" <<avg2[j]<<"\t "<<b<<"\t"<<gpa2[j]<<"\t"<<endl;
    cout<<"3\tcalculus \t "<<cal[j]<<" \t\t" <<avg3[j]<<"\t "<<c<<"\t"<<gpa3[j]<<"\t"<<endl;
    cout<<"4\tenglish \t "<<eng[j]<<" \t\t" <<avg4[j]<<"\t "<<d<<"\t"<<gpa4[j]<<"\t"<<endl;
    sgpa[j]=((3*gpa2[j])+(3*gpa3[j])+(3*gpa4[j])+(4*gpa4[j]))/13;
    cout<<"Total smester gpa is ...........:"<<sgpa[j]<<endl;
    if(sgpa[j]<=4.00 || sgpa[j]>3.75)
    {
       f3++;
    }
    else if(sgpa[j]<3.50 || sgpa[j]>=3.00)
    {
       f4++;
    }
    else if(sgpa[j]<2.50 || sgpa[j]>=2.00)
    {
       f5++;
    }
    if(a=='F')
    {
       cout<<" you have to repeat pf "<<endl;
    }
    if(b=='F')
    {
       cout<<" you have to repeat computing "<<endl;
    }
       if(c=='F')
    {
       cout<<" you have to repeat calculus "<<endl;
    }
    if(d=='F')
    {
       cout<<" you have to repeat english "<<endl;
    }
 }

 for(int k=0;k<2;k++)
 {
    if(sgpa[k]>3.00 || sgpa[k]==3.00)
    {
       f1++;
    }
    else if(sgpa[k]<3.00 || sgpa[k]==2.00)
    {
       f2++;
    }
 }

 cout<<"\n\nTHE number of student who got gpa greter than 3 is"<<f1<<endl;
 cout<<"\n\nTHE number of student who got gpa greter than 2 is"<<f2<<endl;
 cout<<"\n\nTHE number of A grade is..........:"<<f3<<endl;
 cout<<"\n\nTHE number of B grade is .........:"<<f4<<endl;
 cout<<"\n\nTHE number of C grade is .........:"<<f5<<endl;
 getch();
 }
Last edited on
Seems like a vary beginer exercize fatima95. did you guys study structs yet or how to make functions? if soo i recomend that you use them, make a struct called student, and a struct called subject or something, and a function that calculates the gpa of a student. and making the user input the grades of 5 subjects for 50 students is stupid!, make a random distribution of grades using the rand() function.
Last edited on
sir asked to make it through Array only :(
studied functions but no idea of struct
can you help bit more as submission time is near
TinyTeeTree thanks for telling how to put code :)
Topic archived. No new replies allowed.