Saturday, 28 April 2012

Program in C++ for Basic Student Information System


#include<iostream.h>
#include<stdio.h>
#include<dos.h>
class student 
{
 int roll;
 char name[25];
 char address[25];
 char *city;
 public:student()
 {
  cout<<"The Student Information Center!"<<endl;
 }
 void getdata()
 {
  cout<<"\n Enter Roll No.";
  cin>>roll;
  cout<<"\n Enter Name";
  cin>>name;
  cout<<"\n Enter Address";
  cin>>address;
  cout<<"\n Enter City";
  cin>>city;
 }
 void putdata()
 {
  cout<<"\n Student Roll No."<<roll;
  cout<<"\n Student Name"<<name;
  cout<<"\n Student City:"<<city;
 }
};
class mrks: public student
{
 int test1;
 int test2;
 int test3;
 int per;
 public: void input()
 {
  getdata();
  cout<<"\n Enter the marks for Test 1:";
  cin>>test1;
  cout<<"\n Enter the marks for Test 2:";
  cin>>test2;
  cout<<"\n Enter the marks for Test 3:";
  cin>>test3;
 }
 void output()
 {
  putdata();
  cout<<"\n Marks in Test 1 - "<<test1;
  cout<<"\n Marks in Test 2 - "<<test2;
  cout<<"\n Marks in Test 3 - "<<test3;
 }
 void calculate ()
 {
  per=(test1+test2+test3)/3;
  cout<<"\n tottal percentage"<<per;
 }
};
 
void main()
{
 mrks m1[25];
 int ch;
 int count=0;
 do 
 {
  cout<<\n1.Input Data";
  cout<<\n2.Output Data";
  cout<<\n3.Calculate Percentage";
  cout<<\n4.Exit";
  cout<<\n Enter Your Choice";
  cin>>ch;
  switch(ch)
  {
   case 1:
   m1.input();
   count++;
   break;
 
                        case2:
   m1.output();
   break;
 
   case3:
   m1.calculate();
   break;
  }
 } while (ch!=4);
}

2 comments:

  1. School management software system is a web-based global application, which helps in managing student data in schools, colleges and/or universities located in multiple cities.

    Visit http://www.myclassboard.com/school-management-software.html for more details.......

    ReplyDelete
  2. I would like to huge thanks for sharing such excellent information with us, If you are looking a school erp or college erp software to handle the whole functionality of school, institute, college and university then contact to us at Student Information System Software

    ReplyDelete