Quick question

I have this question on a C++ assignment and I have no idea what it means.

“Is-A” and “Has-A” are common vernacular for what kind of relationships between objects?

and this one I just don't know,

How many lines does it take to make an object linkable? What are they?
Last edited on
Is-A deals with inheritance where B inherits from A. B Is-An instance of A
...And composition implies a "has-a" relationship.

1
2
3
class A { 
  int x; // object composition: A has-an int
}


How many lines does it take to make an object linkable? What are they?
I don't know what this means.
Last edited on
c++ does not recognize "lines". C++ can have the entire program on one line. This is likely one of 3 or 4 things...
- the teacher said this in class, and wants you to parrot something
- the teacher is a moron (this is kind of a joke, but there are TONS of professors who are terrible at coding out there trying to teach something they can't rightly do themselves!)
- the teacher wants a count of the required code statements, with or without end of line statements
-its a trick question


Last edited on
Topic archived. No new replies allowed.