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/Philosophy/Page 2
  • Recent Questions
  • Most Answered
  • Answers
  • No Answers
  • Most Visited
  • Most Voted
  • Random

mcqoptions.com Latest Questions

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
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
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
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
Madhu Mehrotra
Madhu Mehrotra
Asked: 3 years agoIn: Inheritance

What is inheritance? Discuss its various forms.

Philosophy
  • 0
  • 1
  • 8
  • 0
Gulzar Chahal
Gulzar Chahal
Asked: 3 years agoIn: Inheritance

Discuss a situation in which the private derivation will be more appropriate as compared to public derivation

Philosophy
  • 0
  • 1
  • 6
  • 0
Balaji Verma
Balaji Verma
Asked: 3 years agoIn: Inheritance

Modify the program 2 of Type C to include constructors for the three classes.

Philosophy
  • 0
  • 1
  • 2
  • 0
Chirag Atwal
Chirag Atwal
Asked: 3 years agoIn: Inheritance

Given the definition of following two classes. Write the constructor definition for both classes.

class Alpha {

int a;

float b;

char c;

public

………. //constructor definition

// has to become here :

};

class Beta:public Alpha {

public:

……..

//constructor definition

};

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

What will be the output of the following program? 

#include<iostream.h>

class Student

{

public:

Student (char pname[]=” “)

{

strcpy(name,pname);

average=semesterHours=0;

}

void addCourse(int hours,float grade)

{

average=(semesterHours*average+grade); semesterHours+=hours;

average=semesterHours;

}

int hours()

{ return semesterHours; }

float gpa()

{ return average;

}

protected:

char name[40];

int semesterHours;

float average;

};

class GradStudent:public Student

{

public:

GradStudent(char pname[]=” “):Student(pname)

{ qual_grade=0;

}

int qualifier()

{ return qual_grade; }

protected:

int qual_grade;

};

int main() { Student commerce(“Saurabh 7/.”); 

GradStudent gs;

commerce.addCourse(4,2.5);

gs.addCourse(4,3.0);

return 0;

}

Philosophy
  • 0
  • 1
  • 6
  • 0

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