Basic C++ inheritance Flashcards
What is the code for the intAtom class in C++?
What code do you need to ensure you include?
include <iostream></iostream>
using namespace std;
What is the code for CharAtom class?
What is the code for the GenericList class in C++?
What is the Node class code in C++?
What are the constructors for the generalList example classes from class (in C++)
What are the other method bodies in the GeneralList example from class (in C++)
What are virtual methods in C++?
What is going on with this code? What does it print? What does the & do?
List 1 is: ( *A* 34)
List 2 is: (* * ( *A* 34) 88)
List 1 is: (99 *A* 34)
List 2 is: (* *(99 *A* 34) 88)
&x gives the address of x. In the example above, we need to use &X because they are stack based variables and we need to pass it a pointer, so we grab one.
In the following code, why the &?
For the code below, why not make them heap-based?
When/where is it necessary to use the virtual keyword?
What is the ListItem code example from class (in C++)?
In general, how does polymorphism work with virtual in C++
When creating an abstract class in C++, what is the issue with virtual?