Made byGirish Arora XII-A
This is to certify that this project has been made by of class on this topic under the guidance of our computer teacher and has been completed it successfully.
Teacher signature
I would like to express my special thanks of gratitude to my teacher Mr. Sangeeta mam as well as our principal Mrs.S.Chatterjee who gave me the golden opportunity to do this wonderful project, which also helped me in doing a lot of Research and I came to know about so many new things I am really thankful to them. Secondly I would also like to thank my parents and friends who helped me a lot in finishing this project within the limited time. I am making this project not only for marks but to also increase my knowledge. Thanks again to all who helped me.
Content
Program 1: student management system Program 2: stock management Program 3: serial/episode Program 4: clothing system
Program to count upper case alphabets Program to count blank space Program to count vowels Program to count no. of “the” Program to count no. of lines starting with “A”
4/4/2013
#include
#include #include #include #include class student { private: char name[20]; int roll_no; int admin_no; float a,b,c; float total; char school[30]; float percentage; char grade[10]; void assign() {total=a+b+c;
percentage=total/3; if(percentage>90) strcpy(grade,"A"); else if(percentage>=80 && percentage<=90) strcpy(grade,"B"); else if(percentage>=70 && percentage<80) strcpy(grade,"C"); else if(percentage>=60 && percentage<70) strcpy(grade,"D"); else if(percentage<60) strcpy(grade,"E"); } public: void enter() { cout<<"enter name --> "; gets(name); cout<<"enter roll no. -->"; cin>>roll_no; cout<<"enter admin no. -->"; cin>>admin_no; cout<<"enter school name -->"; gets(school); cout<<"enter marks in three subjects -->"; cin>>a>>b>>c; } void display() {clrscr(); assign(); cout<<"\ngrade="<
} }; int main() { clrscr(); int ch; do { student s1; s1.enter(); s1.display(); { ofstream abc("student.txt",ios::binary); abc.write((char*)&s1,sizeof(s1)); ofstream fout("student1.txt",ios::app); fout.write((char*)&s1,sizeof(s1)); ofstream bin("student2.dat",ios::binary); bin.write((char*)&s1,sizeof(s1)); ofstream fin("student3.dat",ios::app); fin.write((char*)&s1,sizeof(s1)); }
cout<<"\n\nenter value"<<"\n1 to enter more"<<"\n2 to quit"; cout<<"\nvalue-->"; cin>>ch; cout<<"\n"; clrscr(); if(ch==2) exit(0); }while(ch==1); return 0; getch(); }
4/4/13
#include #include #include class stock { int icode; char item[20]; float price; long int qty; float discount; void finddisc() { if(qty<=50) discount=0; if(qty>50 && qty<=100) discount=5; if(qty>100) discount=10; }public: void buy() {cout<<"enter item code-->"; cin>>icode; cout<<"enter item name-->"; gets(item); cout<<"enter price of item-->"; cin>>price; cout<<"enter quantity of item-->"; cin>>qty; finddisc();
} void showall() {cout<<"code="<"; cin>>serialcode; cout<<"enter title-->"; gets(title); } void otherentries() { cout<<"enter duration-->"; cin>>duration; cout<<"enter no of episodes-->"; cin>>noofepisodes; }
void dispdata() { cout<<"serial code="<
{ cout<<"enter code-->"; gets(code); cout<<"enter type(trouser or shirt)-->"; gets(type); cout<<"enter material-->"; gets(material); cout<<"enter size-->"; cin>>size; calc_price(); } void show() { cout<<"code="<