Program is to define a class as teacher, C/C++ Programming

Program is to define a class as teacher:

Program is to define a class as teacher and collect information about them by using classes and object

class teacher



    char name[20];

    char sub[10];

    float basic,hra,da;

    float salary;

    int calculate()



      return salary;



     void readdata();

     void dispdata();



void teacher::readdata()



  cout<<" enter your name "<<"\n";


  cout<<" enter the subject you teach "<<"\n";


  cout<<" enter the basic salary "<<"\n";


  cout<<" enter the house rent allowance "<<"\n";


  cout<<" enter the dearance allowance"<<"\n";




void teacher::dispdata()



  cout<<" the name is :"<

  cout<<" the subject you teach is :"<


  cout<<" the salary you get is : "<



 void main()



  teacher info;




Posted Date: 10/19/2012 5:32:27 AM | Location : United States

Related Discussions:- Program is to define a class as teacher, Assignment Help, Ask Question on Program is to define a class as teacher, Get Answer, Expert's Help, Program is to define a class as teacher Discussions

Write discussion on Program is to define a class as teacher
Your posts are moderated
Related Questions
Program to show the ascii value of characters: int main() {                 int one_char;                 cout                 one_char = getch();

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate program 1 : package test

(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ

railway reservation programming

Program for Memory Optimization of C / OpenCL Code Project Description: This is possibly a very simple project for someone with an excellent knowledge of C and OpenCL. That,

it is a class enclosed in the scope of another class. For illustration: // Example: Nested class // class OuterClass { class NestedClass { // ... }; // .

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t