C++

posted by .

class professor {};
class teacher : public virtual professor {};
class researcher : public virtual professor {};
class myprofessor : public teacher, public researcher {};

Referring to the sample code above, if an object of class "myprofessor" were created, how many instances of professor will it contain?



Thank you for using the Jiskha Homework Help Forum, BUT why is this posting labeled "C++?" Sorry, but I do not understand what the sample code has to do with anything? A teacher teaches students but a researcher only does research and does not instruct students. A professor, especially at the university level, usually has an associate teaching the class. Can you clarify exactly what you need?

SraJMcGin this appears to be a C++ programming question, but I'm far to rusty to answer it.

Thank you for using the Jiskha Homework Help Forum. Aha! Thank you, Dr. Here are then some sites that may help:

1. http://www.cprogramming.com/

2. http://cplus.about.com/

  • C++ -

    only 1 instance of professor will it contain.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Java

    What is the significance of public, private and public members of a class?
  2. General

    Is it illegal for a school to not have a subsitute teacher assigned to a class when the teacher is not going to be in for the day and students just show up to class and no teacher apears for the whole class?
  3. English Composition

    I'm writing a synthesis paper for my college english composition class. My topic is: The relationship between social class and public education. So far, my thesis: My argument is that students in public education should not be discriminated …
  4. Programming

    The code below shows some of the text for a class called City. Now write a complete public constructor with two formal parameters: a String parameter called cityName, and an int parameter called cityPop. Your code should initialize …
  5. Computer Science

    Consider the following application files: /JavaCS1/src/guiprojectcity2/DisplayWindow.java import java.awt.*; import javax.swing.*; public class DisplayWindow extends JFrame{ private Container c; public DisplayWindow(){ super("Display"); …
  6. math

    •You and three (3) of your friends were in the same advance placement high school chemistry class in high school. All four (4) of you decided to take the same chemistry class together at the local university along with 21 other …
  7. Java programming

    List all overloading methods (including constructors) in this coding.. public class Circle { private double radius; private String colour; public Circle() { radius = 0; colour = ""; } public Circle (double r) { radius = r; } double …
  8. Computer

    Question 1 In the code below, there is an ambiguous reference in the constructor. The constructor is supposed to assign the value of the formal parameter to the class member variable x. Notice, however, that the formal parameter has …
  9. Math (advice)

    So in my calculus class we learned about implicit differentiation today. The professor would stop and ask if we had any questions, which was nice. I didn't ask any questions though, because I don't really like to ask questions during …
  10. Social Studies

    Hi, I'm having a really hard time understanding this concept. I know the answers because my teacher told us them but I don't know why they are the answers. Could you explain them please?

More Similar Questions