Question
C++ Read the following code carefully and make it compact so that it should take input in Person and Student object through default constructors in
C++
Read the following code carefully and make it compact so that it should take input in Person and Student object through default constructors in main(). Given Code: #include class Student: public Person //syntax of writing child class { private: char coursename[30]; char section; public: void setCourseName() { cout<<"Enter Course name: "; cin>>coursename; } void setSection() { cout<<"Enter Section: "; cin>>section; } void showCourseName() const { cout<<"Show Coursename: "<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started