Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

mcqoptions.com

mcqoptions.com Logo mcqoptions.com Logo

mcqoptions.com Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/Inheritance
  • Recent Questions
  • Most Answered
  • Answers
  • No Answers
  • Most Visited
  • Most Voted
  • Random
Nishtha Kannan
Nishtha Kannan
Asked: 3 years agoIn: Inheritance

Write a C++ to read and display information about employees and managers. Employee is a class that contains employee number, name, address ad department. Manager class contains all information of the employee class and a list of employees working under a manager. 

Philosophy
  • 0
  • 1
  • 5
  • 0
Kim Chaudhari
Kim Chaudhari
Asked: 3 years agoIn: Inheritance

Answer the questions (i) to (iv) based on the following: 

class FaceToFace

{

char CenterCode[10];

public:

void Input( );void Output( );

};

class Online

{

char website[50];

public:

void SiteIn( ); 

void SiteOut( );

};

class Training: public FaceToFace, private online

{ 

long Tcode; 

loat charge;

int period;

public:

void Register( );

void show( );

};

(i) Which type of inheritance is shown in the above example?

(ii) Write names of all the member functions accessible from Show( ) function of class Training.

(iii) Write name of all the member accessible through an object of class Training.

(iv) Is the function Output( ) accessible inside the function SiteOut( )? Justify your answer?

Philosophy
  • 0
  • 1
  • 5
  • 0
Hina Kaur
Hina Kaur
Asked: 3 years agoIn: Inheritance

When does ambiguity arise in multiple inheritance? How can one resolve it? What are virtual base classes? What is their significance?

Philosophy
  • 0
  • 1
  • 7
  • 0
Mukul Zahir Balakrishnan
Mukul Zahir Balakrishnan
Asked: 3 years agoIn: Inheritance

Create the following class hierarchy in C++.

Philosophy
  • 0
  • 1
  • 5
  • 0
Aastha Verma
Aastha Verma
Asked: 3 years agoIn: Inheritance

What should be the structure of a class when it has to be a base class for other classes?

Philosophy
  • 0
  • 1
  • 4
  • 0
Bhola Sibal
Bhola Sibal
Asked: 3 years agoIn: Inheritance

How does the invocation of constructor differ in derivation of class and nesting of classes?

Philosophy
  • 0
  • 1
  • 3
  • 0
Naseer Sarna
Naseer Sarna
Asked: 3 years agoIn: Inheritance

Consider the following and answer the questions give below: class MNC

{

char Cname[25];  //Compay name

protected:

char Hoffice[25];  //Head office

public:

MNC();

char Country[25];

void EnterData();

void DisplayData();

};

class Branch:public

MNC 

{  long NOE //Number of employees

char Ctry[25];  //Country

protected:

void Association();

public:

Branch();

void Add();

void Show();

};

class Outlet:public Branch

{

char State[25];

public: Outlet();

void Enter();

void Output();

};

(i) Which class’ constructor will be called first at the time of declaration of an object of class Outlet?

(ii) How many bytes does a object belonging to class Outlet require?

(iii) Name the member function(s), which are accessed from the object(s) of class Outlet.

(iv) Name the data member(s), which are accessible from the object(s) of class Branch.

Philosophy
  • 0
  • 1
  • 8
  • 0
Yasmin Gajendra Nagar
Yasmin Gajendra Nagar
Asked: 3 years agoIn: Inheritance

Imagine a publishing company that markets both books and audio-cassette versions of its works. Create a class publication that stores the title (a string) ad 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). Each of these three classes should have a getdata() function to get its data from the user at the keyboard, and a putdata() function to display its data.

Write a main() program to test the book and tape classes by creating instances of them, asking the user to fill in their data with getdata(), and then displaying the data with putdata().

Philosophy
  • 0
  • 1
  • 0
  • 0
Chand Krishna
Chand Krishna
Asked: 3 years agoIn: Inheritance

Differentiate between public and protected visibility in context of Object Oriented Programming giving suitable examples for each.

Philosophy
  • 0
  • 1
  • 8
  • 0
Wahid Goswami
Wahid Goswami
Asked: 3 years agoIn: Inheritance

Assume a class Derv derived from a base class Base. Both classes contain a member function func() that takes no arguments. Write the definition for a member function of Derv that calls both the func()s.

Philosophy
  • 0
  • 1
  • 4
  • 0
Load More Questions

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 393k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Aditi Dugal

    How to approach applying for a job at a company ...

    • 7 Answers
  • Raghavan Prasad Hayer

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Ankita Dinesh Biswas

    What is a programmer’s life like?

    • 5 Answers
  • 47e0c
    47e0c added an answer Correct Answer - Increasing the yield of animals and improving… November 12, 2022 at 9:56 am
  • b6699
    b6699 added an answer Sender\'s addressDateReceivers name and addressSubjectContentYours faithfullyName November 12, 2022 at 9:56 am
  • 10eb8
    10eb8 added an answer Any uncertinity in measurment is known as errorDifference in true… November 12, 2022 at 9:56 am

Top Members

Trending Tags

Class 11 Parabola Polity Polynomials Probability Projectile Protists Quadrilaterals Rario Reasoning Sampling Social Solutions Spectroscopy Switchgear Thermodynamic Tourism Transients Upsc Wbjee

Explore

  • Home
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Tags
  • Badges
  • Users

Footer

mcqoptions.com

About

MCQOptions.com

Here are the top interview questions, example answers, tips for giving the best response.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Follow

© 2022 MCQOptions. All Rights Reserved