05-04-2011, 12:25 PM
presented by:
Santosh
Parmjeet Kaur
Student.doc (Size: 208 KB / Downloads: 529)
REQUIREMENTS
1) Hardware Requirements
a) Processor:- Pentium 866 MHZ
b) RAM:- 64 MB
c) Hard Disk:- 20 GB
d) Keyboard
e) CD-Rom
f) Color Monitor
2) Software Requirements
a) Language Turbo C++
b) Operating System:- MS-DOS
INTRODUCTION TO ‘C++’
C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the early 1980's, and is based on the C language. The name is a pun - "++" is a syntactic construct used in C (to increment a variable), and C++ is intended as an incremental improvement of C. Most of C is a subset of C++, so that most C programs can be compiled (i.e. converted into a series of low-level instructions that the computer can execute directly) using a C++ compiler.
C is in many ways hard to categorize. Compared to assembly language it is high-level, but it nevertheless includes many low-level facilities to directly manipulate the computer's memory. It is therefore an excellent language for writing efficient "systems" programs. But for other types of programs, C code can be hard to understand, and C programs can therefore be particularly prone to certain types of error. The extra object-oriented facilities in C++ are partly included to overcome these shortcomings.
SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<dos.h>
#include<stdlib.h>
class fee
{
public:
char n[25],cl[10];
long int id,tf,dp,i1,i2,i3,bl;
public:
void get()
{
cout<<" Enter Student Name: ";
gets(n);
gotoxy(2,3);
cout<<"Enter Class: ";
cout<<"\n\n(class name should MCA, BCA, BA)";
gotoxy(15,3);
gets(cl);
gotoxy(2,8);
cout<<"Enter DownPayment: ";
cin>>dp;
}
};
void main()
{
FILE *p;
fee ob;
int c;
clrscr();
while(1)
{
gotoxy(18,8);
cout<<"*";
gotoxy(20,10);
cout<<"Press 1 for Admmission";
gotoxy(20,12);
cout<<"Press 2 for Check All Data";
gotoxy(20,14);
cout<<"Press 3 for Check Individual Class Data";
gotoxy(20,16);
cout<<"Press 4 for Check One Student Detail";
gotoxy(20,18);
cout<<"Press 5 for Deposit Fee";
gotoxy(20,20);
cout<<"Press 6 for Check Fee Structure";
gotoxy(20,22);
cout<<"Press 7 for Exit";
gotoxy(20,24);
cout<<"Enter Your Choice: ";
gotoxy(18,26);
cout<<"*";
gotoxy(39,24);
cin>>c;
clrscr();
switch©
{
case 1:
char y='y';
while(y=='y'|y=='Y')
{
rewind(p);
p=fopen("fdata.dat","rb+");
int count=0;
while(fread(&ob,sizeof(ob),1,p)==1)
{
count=count+1;
}
p=fopen("fdata.dat","ab+");
ob.get();
if(count==0)
{
ob.id=101;
}
if(count!=0)
{
ob.id=101+count;
}
if(stricmp(ob.cl,"MCA")==0)
{
ob.tf=50000;
}
if(stricmp(ob.cl,"BCA")==0)
{
ob.tf=25000;
}
if(stricmp(ob.cl,"BA")==0)
{
ob.tf=7000;
}
Santosh
Parmjeet Kaur
Student.doc (Size: 208 KB / Downloads: 529)
REQUIREMENTS
1) Hardware Requirements
a) Processor:- Pentium 866 MHZ
b) RAM:- 64 MB
c) Hard Disk:- 20 GB
d) Keyboard
e) CD-Rom
f) Color Monitor
2) Software Requirements
a) Language Turbo C++
b) Operating System:- MS-DOS
INTRODUCTION TO ‘C++’
C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the early 1980's, and is based on the C language. The name is a pun - "++" is a syntactic construct used in C (to increment a variable), and C++ is intended as an incremental improvement of C. Most of C is a subset of C++, so that most C programs can be compiled (i.e. converted into a series of low-level instructions that the computer can execute directly) using a C++ compiler.
C is in many ways hard to categorize. Compared to assembly language it is high-level, but it nevertheless includes many low-level facilities to directly manipulate the computer's memory. It is therefore an excellent language for writing efficient "systems" programs. But for other types of programs, C code can be hard to understand, and C programs can therefore be particularly prone to certain types of error. The extra object-oriented facilities in C++ are partly included to overcome these shortcomings.
SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<dos.h>
#include<stdlib.h>
class fee
{
public:
char n[25],cl[10];
long int id,tf,dp,i1,i2,i3,bl;
public:
void get()
{
cout<<" Enter Student Name: ";
gets(n);
gotoxy(2,3);
cout<<"Enter Class: ";
cout<<"\n\n(class name should MCA, BCA, BA)";
gotoxy(15,3);
gets(cl);
gotoxy(2,8);
cout<<"Enter DownPayment: ";
cin>>dp;
}
};
void main()
{
FILE *p;
fee ob;
int c;
clrscr();
while(1)
{
gotoxy(18,8);
cout<<"*";
gotoxy(20,10);
cout<<"Press 1 for Admmission";
gotoxy(20,12);
cout<<"Press 2 for Check All Data";
gotoxy(20,14);
cout<<"Press 3 for Check Individual Class Data";
gotoxy(20,16);
cout<<"Press 4 for Check One Student Detail";
gotoxy(20,18);
cout<<"Press 5 for Deposit Fee";
gotoxy(20,20);
cout<<"Press 6 for Check Fee Structure";
gotoxy(20,22);
cout<<"Press 7 for Exit";
gotoxy(20,24);
cout<<"Enter Your Choice: ";
gotoxy(18,26);
cout<<"*";
gotoxy(39,24);
cin>>c;
clrscr();
switch©
{
case 1:
char y='y';
while(y=='y'|y=='Y')
{
rewind(p);
p=fopen("fdata.dat","rb+");
int count=0;
while(fread(&ob,sizeof(ob),1,p)==1)
{
count=count+1;
}
p=fopen("fdata.dat","ab+");
ob.get();
if(count==0)
{
ob.id=101;
}
if(count!=0)
{
ob.id=101+count;
}
if(stricmp(ob.cl,"MCA")==0)
{
ob.tf=50000;
}
if(stricmp(ob.cl,"BCA")==0)
{
ob.tf=25000;
}
if(stricmp(ob.cl,"BA")==0)
{
ob.tf=7000;
}