Answer to Question #181849 in C++ for daniyal

Question #181849

a class of teacher that contains the attribute teacher name,age and address. it also contain member function to input and display. write another class of writer that contains the attribute name,address and no of book witten byhim.it also contain member function to input and show.


1
Expert's answer
2021-04-15T23:21:04-0400
#include <iostream.h>
#include <conio.h>
class Teacher
{ private:
 char Name[30];
 public:
 char Address[50];
 public:
 void input()
 {cout<<"Enter your name"<<end1;
  cin>>name;
  cout<<"Enter your age"<<end1;
  cin>>age;
  cout<<"Enter your Address"<<end1;
  cin>>Address;
 }
 void dislay()
 {cout<<end1<<"your Name is"<<Name<<end1;
  cout<<end1<<"your age is"<<age<<end1;
  cout<<end1<<"your Address is"<<Address<<end1;
 }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS