Sie sind auf Seite 1von 31

COMPUTER

PROJECT
2010-11
REPORT CARD

-MITHUN.B & SHREE VIJAY


CONTENTS

 ACKNOWLEDGEMENT
 System Description at a glance

 Problem Description
 Requirement analysis
 Header files
 Hardware and software requirements

 System Specification
 System design
 Data design
 Data dictionary & file design structures.

 Function Descriptions
 Program Source Code
 Output shots
 Bibliography
ACKNOWLEDGEMENT

We would like to express our gratitude to the Principal, for granting


permission to conduct the project work in the school laboratory.

It gives us immense pleasure to thank "Mrs.POORNIMA.K.S", our guide,


for spending her valuable time supporting us at all stages of the project.

We also wish to thank all our fellow students for their cooperation and
support.

Most importantly, we are thankful to our respective parents who have


been a constant source of inspiration for us throughout the course.

-MITHUN & VIJAY


A GLANCE AT C++

C++ is one of the most popular programming languages ever created and its
application domains include systems software, application software, device
drivers, embedded software, high-performance server and client applications, and
entertainment software.

C++ is regarded as a "middle-level" language, as it comprises of a combination of


both high-level and low-level language features. It was developed by Bjarne
Stroustrup starting in 1979 at Bell Labs as an enhancement to the C language. The
term C++ was first used in 1983.

After first release, C++ was developed significantly. In particular, "ARM C++"
added exceptions and templates, and ISO C++ added RTTI, namespaces, and a
standard library.

C++ was designed for the UNIX system environment. Programmers could improve
the quality of code they produced and reusable code was easier to write with C++.

The major reason behind the success and popularity of C++ is that it support the
object oriented technology, the latest in the software development and the most
near to the real world.
COMPUTER PROJECT
SYNOPSIS

REPORT CARD

Team particulars:
1. MITHUN B.

Class: XII School: Silicon City Academy of Secondary Education

2. SHREE VIJAY MASKERY

Class: XII School: Silicon City Academy of Secondary Education

Abstract:
This project aims in developing software that helps in maintaining a systematic way of keeping records of
student’s scores.

A very helpful and time saving software for the teachers. Each time if there are any changes that has to
be made, it can be edited easily and loss of data can be avoided.

In this project c++ language is used to maintain all the data. It provides many features like file
handling ,data can be easily maintained and many features that are required while doing a
project.
Objective:
 To reduce time for teachers.

 To reduce large amount of paper work.

 Retrieval of information faster.

 To avoid calculation errors.

Advantages of the proposed system:


 Converts all the manual work which is time consuming and error prone to fully automated
system.

 Helps in eliminating all the paper work, saves time.

 Storage of large amount and any number of data.

 Makes the system more feasible and flexible and thus retrieval of information becomes
convenient.

 C++ has support for most of the web servers available today.

Conclusion:
This project basically develops software that is necessary for the teachers to store and keep
track of student’s records. A very convenient and easy to use software which ensures error free data,
decrease in loss of data and data redundancy.
SYSTEM DESCRIPTION AT A GLANCE
The student REPORT CARD is divided in two different terms-

1. First term

2. Second term

Our aim is to make a computer program is to have a record of the entire


student’s academic performance in two different terms. And it is such a way that
the students get their academic records with all the details required when
accessed into the school/college information database. And the program also has
the options of addition, modifications and deletion of any of the student records if
required. In addition to it, if there are too many records, it can be searched easily
be the user according to his/her requirements.

Files:
We have two different files –

 For report list which has options of adding students, viewing the
details, modifying the record information and deletion of the
student’s information.
Input for the program is:

 Roll number
 Name of the student
 Marks obtained in five subjects
Output of the program:

 Record of the information in sorted fashion


 All the details given by the user with percentage and grade
 Modified output based on users demands for adding, modifying,
updating and deletion of the records.
PROBLEM DESCRIPTION

Requirement analysis

We have studied the existing system in detail. The finding of our study
yields various pieces of information which are described in the following manner.
To view the report card of the students and other related modules, we enter all
the following details for the database:

 Roll number
 Name of the student
 Class
 Marks of five subjects (English, Math, Physics, Chemistry and
Computer Science).
 Confirmation process
 Adding any new student information
 Modification(Updating the list) of any information on the
database

Required output of the system

The computerized system generates the following reports as:

 The system should be able to generate the cases of distinct


functions included in the database.
 Report card of students in both the terms with their percentage and
grade.
 Modified report list based on the operations required by the user.
 Closing the student information file.
 Display of list again if commanded.
Data Dictionary & File Design Structures
Variables Used as Type
Description
1.roll Attribute of report Integer 2 bytes
2.name Attribute of report 20 characters
3.m1 Attribute of report Integer 2 bytes
4.m2 Attribute of report Integer 2 bytes
5.m3 Attribute of report Integer 2 bytes
6.m4 Attribute of report Integer 2 bytes
7.m5 Attribute of report Integer 2 bytes
8.g Attribute of report 10 characters
9.t Attribute of report Integer 2 bytes
10.p Attribute of report Integer 2 bytes
11.s Access object for the class ‘report’ 30 objects

12.x & y Coordinates on output screen Integer 2 bytes

13.i&n Global variables Integer 2 bytes


14.k Attribute of append() function Integer 2 bytes

15.flag Tag for checking Integer 2 bytes


16.back File access variable
17.tp Accessor object of report

18.j For loop variable Integer 2 bytes


19.r Object of output file stream
20.t Object of input file stream
Character
20.ch To capture the option
chosen in term1() & term2()
FUNCTION DESCRIPTION
S.no Function name Description
1. void term1() Function to access the report card of first term.

2. void term2() Function to access the report card of second term.

3. void terms() Function to access both the terms(terms1 & 2).

4. void last() Function to credit the programmers.

5. void input() Details needed for the report card of students

6. void search() Function to search a record in the report card.

7. void output() Function to generate the output screen.

8. void sort() Function to sort the records in the report card

9. void reads() Function to view the report card

10. void main() Controls the entire program.


Source Code

#include<fstream.h>

#include<stdlib.h>

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

#include<dos.h>

#include<string.h>

#include<iomanip.h>

ofstream r;

ifstream t;

void term1();

void term2();

void terms();

void credits();

class report

public:

int roll;

char name[20];

int m1,m2,m3,m4,m5;
char g[10];

int t;

int p;

void input()

gotoxy(1,5);

cout<<"\tENTER ROLL NUMBER OF THE STUDENT :";

cin>>roll;

cout<<"\tENTER NAME OF THE STUDENT :";

gets(name);

cout<<"\n\n\tENTER MARKS OBTAINED IN EACH SUBJECT";

cout<<"\n";

cout<<"\tENTER MARKS IN ENGLISH:";

cin>>m1;

cout<<"\n";

cout<<"\tENTER MARKS IN MATHS:";

cin>>m2;

cout<<"\n";

cout<<"\tENTER MARKS IN PHYSICS:";

cin>>m3;

cout<<"\n";

cout<<"\tENTER MARKS IN CHEMISTRY:";

cin>>m4;

cout<<"\n";

cout<<"\tENTER MARKS IN COMPUTER:";


cin>>m5;

cout<<"\n";

cleardevice();

t=m1+m2+m3+m4+m5;

p=t/5;

gotoxy(1,1);

void output()

cout<<"\n";

cout<<" "<<roll<<"\t"<<" "<<name<<"\t";

cout<<" "<<m1<<","<<m2<<","<<m3<<","<<m4<<","<<m5;

cout<<"\t"<<" "<<p<<"%"<<"\t"<<" "<<g<<"\n";

cout<<"\t";

}s[30];

int i,n;

void input1()

cleardevice();

cout<<"\n";

cout<<"\tENTER THE NUMBER OF RECORDS TO BE CREATED :";

cin>>n;
cleardevice();

for(i=0;i<n;i++)

s[i].input();

if(s[i].p>=95)

strcpy(s[i].g,"A1");

if(s[i].p>=90&&s[i].p<=95)

strcpy(s[i].g,"A2");

if(s[i].p>=80&&s[i].p<=90)

strcpy(s[i].g,"B1");

if(s[i].p>=70&&s[i].p<=80)

strcpy(s[i].g,"B2");

if(s[i].p>=60&&s[i].p<=70)

strcpy(s[i].g,"C1");

if(s[i].p>=50&&s[i].p<=60)

strcpy(s[i].g,"C2");

if(s[i].p>=40&&s[i].p<=50)

strcpy(s[i].g,"D1");

if(s[i].p<=40)

strcpy(s[i].g,"D2");

r.write((char*)&s[i],sizeof(s[i]));

void append()
{

clrscr();

cleardevice();

cout<<"\n";

int k;

cout<<"\t\t\t*-----------*"<<"\n";

cout<<"\t\t\t| APPENDING |"<<"\n";

cout<<"\t\t\t*-----------*"<<"\n"<<"\n";

cout<<"\tENTER THE NUMBER OF RECORDS TO BE APPENDED :";

cin>>k;

clrscr();

for(i=0;i<k ;i++)

s[i].input();

if(s[i].p>=95)

strcpy(s[i].g,"A1");

if(s[i].p>=90&&s[i].p<=95)

strcpy(s[i].g,"A2");

if(s[i].p>=80&&s[i].p<=90)

strcpy(s[i].g,"B1");

if(s[i].p>=70&&s[i].p<=80)

strcpy(s[i].g,"B2");

if(s[i].p>=60&&s[i].p<=70)

strcpy(s[i].g,"C1");

if(s[i].p>=50&&s[i].p<=60)
strcpy(s[i].g,"C2");

if(s[i].p>=40&&s[i].p<=50)

strcpy(s[i].g,"D1");

if(s[i].p<=40)

strcpy(s[i].g,"D2");

r.write((char*)&s[i],sizeof(s[i]));

getch();

n+=k;

void search()

clrscr();

cleardevice();

char name[20];

int flag=0;

cout<<"\n";

cout<<"\t\t\t\t*-----------*"<<"\n";

cout<<"\t\t\t\t| SEARCHING |"<<"\n";

cout<<"\t\t\t\t*-----------*"<<"\n"<<"\n";

step:

cout<<"\n\tENTER THE NAME TO BE SEARCHED :";

gets(name);
cleardevice();

gotoxy(33,4);

cout<<"SEARCHED LIST";

gotoxy(33,5);

cout<<".............";

cout<<"\n";

gotoxy(3,6);

cout<<"ROLL";

gotoxy(11,6);

cout<<"NAME";

gotoxy(24,6);

cout<<"MARKS";

gotoxy(38,6);

cout<<"PERCENTAGE";

gotoxy(52,6);

cout<<"GRADE";

cout<<"\n";

gotoxy(2,7);

cout<<".......................................................";

cout<<"\n";

for(i=0;i<n;i++)

t.read((char *) &s[i],sizeof(s[i]));
if(strcmp(name,s[i].name)==0)

flag=1;

s[i].output();

break;

if(flag==0)

cleardevice();

cout<<"\tSORRY\n";

cout<<"\tTHE NAME DOES NOT EXIST.\n";

getch();

void sort()

clrscr();

cleardevice();

report tp;

cout<<"\t\t\t*-------------*"<<"\n";

cout<<"\t\t\t| SORTED LIST |"<<"\n";

cout<<"\t\t\t*-------------*"<<"\n"<<"\n";

gotoxy(3,6);
cout<<"ROLL";

gotoxy(11,6);

cout<<"NAME";

gotoxy(24,6);

cout<<"MARKS";

gotoxy(38,6);

cout<<"PERCENTAGE";

gotoxy(52,6);

cout<<"GRADE";

cout<<"\n";

gotoxy(2,7);

cout<<".......................................................";

cout<<"\n";

for(i=0;i<n;i++)

t.read((char *) &s[i],sizeof(s[i]));

for(i=0;i<n-1;i++)

{ for(int j=i+1;j<n;j++)

{ if(strcmp(s[i].name,s[j].name)>0)

{ tp=s[i];

s[i]=s[j];

s[j]=tp;

}
for(i=0;i<n ;i++)

s[i].output();

getch();

void reads()

clrscr();

cleardevice();

cout<<"\n";

cout<<"\t**------------------------------------------------**"<<"\n";

cout<<"\t|| REPORT CARD OF STUDENTS ||"<<"\n";

cout<<"\t**------------------------------------------------**"<<"\n"<<"\n";

gotoxy(3,6);

cout<<"ROLL";

gotoxy(11,6);

cout<<"NAME";

gotoxy(24,6);

cout<<"MARKS";

gotoxy(38,6);

cout<<"PERCENTAGE";

gotoxy(52,6);

cout<<"GRADE";

cout<<"\n";
gotoxy(2,7);

cout<<".......................................................";

cout<<"\n";

for(i=0;i<n;i++)

t.read((char *) &s[i],sizeof(s[i]));

s[i].output();

getch();

void terms()

int gdriver = DETECT, gmode, errorcode;

initgraph(&gdriver,&gmode,"");

errorcode = graphresult();

if (errorcode !=grOk) /* an error code occurred */

printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch;

exit(1); /* terminate with an error code */

char chc;

rectangle(1,1,getmaxx(),getmaxy());
outtextxy(50,240,"REPORT CARD");

setcolor(115);

settextstyle(7,0,4);

outtextxy(240,50,"SELECT A TERM");

outtextxy(240,90,"OF YOUR CHOICE.");

outtextxy(225,105," ..........................................");

setcolor(75);

settextstyle(1,0,4);

outtextxy(300,170,"1.TERM I");

outtextxy(300,220,"2.TERM II");

outtextxy(300,270,"3.EXIT");

settextstyle(54,0,3);

outtextxy(500,400,"ENTER CHOICE");

chc=getch();

switch(chc)

case '1':cleardevice();

term1();

break;

case '2':cleardevice();

term2();

break;

case '3':cleardevice();

credits();

exit(0);
break;

default :clrscr();

cleardevice();

settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);

setcolor(WHITE);

outtextxy(220,210,"WRONG CHOICE !");

outtextxy(170,270,"PLEASE TRY AGAIN.");

sleep(1);

cleardevice();

terms();

closegraph();

void credits()

cleardevice();

gotoxy(40,10);

cout<<"BY";

delay(70);

gotoxy(28,14);

cout<<"MITHUN.B & SHREE VIJAY MASKERY";

delay(70);

gotoxy(37,16);
cout<<"CLASS XII";

gotoxy(23,18);

cout<<"SILICON CITY ACADEMY OF SECONDARY EDUCATION";

gotoxy(30,30);

cout<<"Press any key to exit...";

getch();

exit(0);

/***********************************menu1************************************/

void term1()

cleardevice();

char ch;

back:

settextstyle(SANS_SERIF_FONT,HORIZ_DIR,4);

setcolor(75);

outtextxy(180,50,"1.MAKE REPORT CARD");

outtextxy(180,90,"2.ADD INFO");

outtextxy(180,130,"3.SORTED LIST");

outtextxy(180,170,"4.SEARCH A NAME");

outtextxy(180,210,"5.VIEW REPORT CARD");

outtextxy(180,250,"6.MAIN MENU");

settextstyle(SANS_SERIF_FONT,HORIZ_DIR,3);
outtextxy(400,420,"ENTER CHOICE");

ch=getch();

switch(ch)

case '1':

r.open("report1");

input1();

r.close();

cleardevice();

goto back;

case '2':

r.open("report1",ios::app|ios::out);

append();

r.close();

cleardevice();

goto back;

case '3':

t.open("report1");

sort();

t.close();

cleardevice();

goto back;
case '4':

t.open("report1");

search();

t.close();

cleardevice();

goto back;

case '5':

t.open("report1");

reads();

t.close();

cleardevice();

goto back;

case '6':

closegraph();

terms();

default :clrscr();

cleardevice();

settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);

setcolor(WHITE);

outtextxy(220,240,"WRONG CHOICE !");


outtextxy(190,280,"PLEASE TRY AGAIN.");

sleep(1);

cleardevice();

goto back;

/
***************************************menu2*****************************************
***/

void term2()

cleardevice();

char ch;

back:

settextstyle(SANS_SERIF_FONT,VERT_DIR,4);

setbkcolor(BLACK);

settextstyle(SANS_SERIF_FONT,HORIZ_DIR,4);

setcolor(75);

outtextxy(180,50,"1.MAKE REPORT CARD");

outtextxy(180,90,"2.ADD INFO");

outtextxy(180,130,"3.SORTED LIST");

outtextxy(180,170,"4.SEARCH A NAME");

outtextxy(180,210,"5.VIEW REPORT CARD");

outtextxy(180,250,"6.MAIN MENU");

settextstyle(SANS_SERIF_FONT,HORIZ_DIR,3);
outtextxy(400,420,"ENTER CHOICE");

ch=getch();

switch(ch)

case '1':

r.open("report_2");

input1();

r.close();

cleardevice();

goto back;

case '2':

r.open("report_2",ios::app|ios::out);

append();

r.close();

cleardevice();

goto back;

case '3':

t.open("report_2");

sort();

t.close();

cleardevice();

goto back;
case '4':

t.open("report_2");

search();

t.close();

cleardevice();

goto back;

case '5':

t.open("report_2");

reads();

t.close();

cleardevice();

goto back;

case '6':

closegraph();

terms();

default :clrscr();

cleardevice();

settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);

setcolor(WHITE);

outtextxy(220,240,"WRONG CHOICE !");


outtextxy(190,280,"PLEASE TRY AGAIN.");

sleep(2);

cleardevice();

goto back;

/**********************************main**************************************/

void main()

int gdriver = DETECT, gmode, errorcode;

initgraph(&gdriver,&gmode,"c:\\tc\\bgi");

errorcode = graphresult();

if (errorcode != grOk) /*an error occurred*/

printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch;

exit(1); /* terminate with an error code */

settextstyle(7,0,5);

setcolor(BLUE);

rectangle(1,1,getmaxx(),getmaxy());

setbkcolor(15);
setcolor(7);

ellipse(320,240,0,360,300,200);

delay(2000);

setcolor(BLUE);

outtextxy(155,200,"REPORT CARD");

delay(4500);

closegraph();

terms();

Das könnte Ihnen auch gefallen