Create employee bio-data using following classes i) Personal record ii)Professional record iii)Academic record Assume appropriate data members and member function to accept required data & print bio-data. Create bio-data using multiple inheritance using C++.

 Create employee bio-data using following classes i) Personal record ii)Professional record iii)Academic record 

Assume appropriate data members and member function to accept required

data & print bio-data. Create bio-data using multiple inheritance using C++.

OUTPUT OF THE PROGRAM

#include<iostream>

#include<iomanip>

using namespace std;


class personal

{

  protected:

          char name[10],add[10],dob[10];

          int mob;

          char bg[5],gender[6];

    public:

          void getdata()

          {

              cout<<"Enter your Name :";

              cin>>name;

              cout<<"Enter your Current Address :";

              cin>>add;

              cout<<"Enter your Mobile No. :";

              cin>>mob;

              cout<<"Enter your Date of Birth :";

              cin>>dob;

              cout<<"Enter your Blood group :";

              cin>>bg;

              cout<<"Enter your Gender :";

              cin>>gender;

          }

};


class professional

{

  protected:

           char post[10],compname[10],dept[10];

           int salary;

     public:

           void accept()

           {

               cout<<"Enter your Company Name :";

               cin>>compname;

               cout<<"Enter your Department :";

               cin>>dept;

               cout<<"Enter your Post Name :";

               cin>>post;

               cout<<"Enter your Salary :";

               cin>>salary;

           } 

};


class academic

{

  protected:

          char qua1[10],qua2[10];

          int score1,score2;

          char sport[10];

     public:

          void data()

          {

               cout<<"Enter your highest Qualification :";

               cin>>qua1;

               cout<<"Enter your second highest Qualification :";

               cin>>qua2;

               cout<<"Enter your highest Qualification Score :";

               cin>>score1;

               cout<<"Enter your second highest Qualification Score :";

               cin>>score2;

               cout<<"Are you played any sport  :";

               cin>>sport;

          }

};


class biodata:public personal, public professional,public academic 

{

 public:

      void display()

      {

         cout<<"\n********************BIODATA************************\n";

         cout<<"\n********************Personal Data********************\n";

         cout<<setw(10)<<"Name"<<setw(10)<<"ADD"<<setw(10)<<"Mob no"<<setw(10)<<"DOB"<<setw(10)<<"BG"<<setw(10)<<"Gender";

         cout<<"\n"<<setw(10)<<name<<setw(10)<<add<<setw(10)<<mob<<setw(10)<<dob<<setw(10)<<bg<<setw(5)<<gender;

         

         cout<<"\n*******************Professional Details****************\n";

         cout<<setw(10)<<"Comp Name"<<setw(10)<<"Dept"<<setw(10)<<"Post"<<setw(10)<<"Salary";

         cout<<"\n"<<setw(10)<<compname<<setw(10)<<dept<<setw(10)<<post<<setw(10)<<salary;

         

         cout<<"\n*******************Academic Details *******************\n";

         cout<<setw(5)<<"1st high Qua. "<<setw(5)<<"2nd high Qua. "<<setw(5)<<"1st high Qua.score "<<setw(5)<<"2nd high Qua.score "<<setw(5)<<"Sport";

         cout<<"\n"<<setw(10)<<qua1<<setw(10)<<qua2<<setw(13)<<score1<<setw(23)<<score2<<setw(15)<<sport;

       } 

};


int main()

{

  biodata b;

  b.getdata();

  b.accept();

  b.data();

  b.display();

 cout<<"\n\n";

  return 0;

}

                                                          **********OUTPUT*************

/*

Enter your Name :Sushil

Enter your Current Address :Nashik

Enter your Mobile No. :123456

Enter your Date of Birth :2Jan

Enter your Blood group :B+

Enter your Gender :M

Enter your Company Name :X

Enter your Department :X

Enter your Post Name :X

Enter your Salary :75000

Enter your highest Qualification :ABC

Enter your second highest Qualification :XYZ

Enter your highest Qualification Score :85

Enter your second highest Qualification Score :95

Are you played any sport  :Yes


********************BIODATA************************


********************Personal Data********************

      Name       ADD    Mob no       DOB        BG    Gender

    Sushil    Nashik    123456      2Jan        B+    M

*******************Professional Details****************

 Comp Name      Dept      Post    Salary

         X         X         X     75000

*******************Academic Details *******************

1st high Qua. 2nd high Qua. 1st high Qua.score 2nd high Qua.score Sport

       ABC       XYZ           85                     95            Yes


*/


For more such posts click the link:-http://svencrai.com/G8W


Comments

Popular posts from this blog

A book shop maintains the inventory of books that are being sold at the shop. The list includes details such as author, title, price, publisher and stock position. Whenever a customer wants a book, the sales person inputs the title and author and the system searches the list and displays whether it is available or not. If it is not, an appropriate message is displayed. If it is, then the system displays the book details and requests for the number of copies required. If the requested copies book details and requests for the number of copies required. If the requested copies are available, the total cost of the requested copies is displayed; otherwise the message ?Required copies not in stock? is displayed. Design a system using a class called books with suitable member functions and Constructors. Use new operator in constructors to allocate memory space required. Implement C++ program for the system

Write C++ program for storing appointment schedule for day. Appointments are booked randomly using linked list. Set start and end time and min and max duration for visit slot. Write functions for- a)Display free slots b)Book appointment c)Cancel appointment ( check validity, time bounds, availability etc) d)Sort list based on time e)Sort list based on time using pointer manipulation

Imagine a publishing company which does marketing for book and audiocassette versions. Create a class publication that stores the title (a string) and price (type float) of a publication. From this class derive two classes: book, which adds a page count (type int), and tape, which adds a playing time in minutes (type float). Write a program that instantiates the book and tape classes, allows user to enter data and displays the data members.