© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

CPP Program For Fee Structure Management System
#include #include #include #include #include #include #include #include #include int i,j,li,lp,rec,valid; void help(); char ch,choice; class DRAW { public : void LINE_HOR(int, int, int, char) ; void LINE_VER(int, int, int, char) ; void BOX(int,int,int,int,char) ; } ; class FEE { private : int Class ; float tuition, ac, science, computer, activity ; void DISPLAY(int) ; void MODIFY_RECORD(int, float, float, float, float, float) ; public : void ADDITION(void) ; void MODIFICATION(void) ; void FEE_SLIP(void) ; void LIST(void) ; void HELP(void); }fee ; void mainmenu() { clrscr(); textcolor(WHITE); for(li=30;li<=50;li++) { textcolor(WHITE); gotoxy(li,14); delay(30); printf("*"); } for(li=50;li>=30;li--) { textcolor(WHITE); gotoxy(li,30); delay(30); printf("*"); } for(lp=15;lp<30;lp++) { gotoxy(30,lp); delay(100); printf("|"); } for(lp=29;lp>=15;lp--) { gotoxy(50,lp); delay(100); printf("|"); } gotoxy(15,10); textcolor(LIGHTGRAY); cprintf("\nPress the corresponding Keys for the desired action"); gotoxy(35,16); textcolor(BROWN); cprintf("\nF: FEE SLIP"); gotoxy(35,19); textcolor(LIGHTMAGENTA); cprintf("\nM: MODIFY"); gotoxy(35,22); textcolor(LIGHTBLUE); cprintf("\nL: LIST"); gotoxy(35,25); textcolor(LIGHTRED); cprintf("\nH: HELP"); gotoxy(35,28); textcolor(GREEN); cprintf("\nQ: QUIT"); choice=getch(); ch=toupper(choice); switch(ch) { case'F':fee.FEE_SLIP(); break; case'M':fee.MODIFICATION(); break; case'L':fee.LIST(); break; case'H':fee.HELP(); break; case'Q':exit(0); break; default:gotoxy(33,40); cout<<"\nIllegal Choice Press any key to return to Main Menu"; getch(); mainmenu(); } } void DRAW :: LINE_HOR(int column1, int column2, int row, char c) { for ( column1; column1<=column2; column1++ ) { gotoxy(column1,row) ; cout < for EXIT" ; gotoxy(5,5) ; clreol() ; cout <<"\nEnter Class for the Modification of the Fee Structure : " ; gets(t1) ; t = atoi(t1) ; tclass = t ; if (strlen(t1) == 0) return ; if (tclass < 1 || tclass > 12) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; clrscr() ; gotoxy(71,1) ; cout <<"\n<0>=Exit" ; DISPLAY(tclass) ; gotoxy(5,25) ; clreol() ; do { gotoxy(5,15) ; clreol() ; cout <<"\nDo you want to modify the fee structure (y/n) : " ; ch = getche() ; if (ch == '0') return ; ch = toupper(ch) ; } while (ch != 'N' && ch != 'Y') ; if (ch == 'N') mainmenu(); float ttution=0.0, tac=0.0, tscience=0.0, tcomputer=0.0, tactivity=0.0 ; gotoxy(5,13) ; clreol() ; gotoxy(5,17) ; cout <<"\nTuition Fee : " ; gotoxy(5,18) ; cout <<"\nAnnual Charges Fee : " ; gotoxy(5,19) ; cout <<"\nScience Fee : " ; gotoxy(5,20) ; cout <<"\nComputer Fee : " ; gotoxy(5,21) ; cout <<"\nActivity Fee : " ; int modified = 5 ; fstream file ; file.open("FEE.DAT", ios::in) ; while (file.read((char *) this, sizeof(FEE))) if (Class == tclass) break ; file.close() ; do { valid = 1 ; gotoxy(5,27) ; clreol() ; cout <<"\nEnter TUITION FEE or Press for no change" ; gotoxy(19,17) ; clreol() ; gets(t1) ; t2 = atof(t1) ; ttution = t2 ; if (t1[0] == '0') return; if (strlen(t1) == 0) break ; if (ttution > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; ttution = tuition ; gotoxy(20,17) ; cout < for no change" ; gotoxy(26,18) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tac = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tac > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tac = ac ; gotoxy(26,18) ; cout < for no change" ; gotoxy(19,19) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tscience = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tscience > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tscience = science ; gotoxy(19,19) ; cout < for no change" ; gotoxy(19,20) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tcomputer = t2 ; if (t1[0] == '0') return ; if (strlen(t1) == 0) break ; if (tcomputer > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tcomputer = computer ; gotoxy(19,20) ; cout < for no change" ; gotoxy(19,21) ; clreol() ; gets(t1) ; t2 = atof(t1) ; tactivity = t2 ; if (t1[0] == '0') return; if (strlen(t1) == 0) break; if (tactivity > 1000) { valid = 0 ; gotoxy(5,27) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; if (strlen(t1) == 0) { modified-- ; tactivity = activity ; gotoxy(19,21) ; cout < for EXIT" ; gotoxy(5,5) ; clreol() ; cout <<"\nEnter Class to see the Fee Structure : " ; gets(t1) ; t = atoi(t1) ; tclass = t ; if (strlen(t1) == 0) return ; if (tclass < 1 || tclass > 12) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"\n7Enter correctly" ; getch() ; } } while (!valid) ; char name[26] ; do { gotoxy(5,25) ; clreol() ; cout <<"\nENTER NAME OF THE STUDENT" ; valid = 1 ; gotoxy(5,7) ; clreol() ; cout <<"\nName : " ; gets(name) ; if (strlen(name) < 1 || strlen(name) > 25) { valid = 0 ; gotoxy(5,25) ; clreol() ; cout <<"\nNAME SHOULD NOT BE GREATER THAN 25" ; getch() ; } } while (!valid) ; clrscr() ; DRAW d ; d.BOX(20,2,61,24,987) ; gotoxy(24,3) ; cout <<"\n CARMEL CONVENT SCHOOL " ; int d1, m1, y1 ; struct date dt; getdate(&dt); d1 = dt.da_day ; m1 = dt.da_mon ; y1 = dt.da_year ; gotoxy(45,4) ; cout <<"\nDate: " <=10;i--) { gotoxy(i,22); delay(30); printf("\""); } for(j=16;j<=21;j++) { gotoxy(10,j); delay(100); printf("-"); } for(j=21;j>=16;j--) { gotoxy(70,j); delay(100); printf("-"); } gotoxy(16,17); textcolor(BLINK + MAGENTA); cprintf("\nWelcome To Fee Structure System"); gotoxy(12,20); cprintf("\nDesigned and Coded ----"); gotoxy(36,28); textcolor(LIGHTGREEN); cprintf("\nCoded By"); gotoxy(24,34); textcolor(3); cprintf("\nAanchal Saxena XII 'B'"); gotoxy(44,48); textcolor(WHITE); cprintf("\nPress Any Key To ..........Continue"); getch(); mainmenu(); }

 
SLogix Student Projects
bottom