CSC2050 - Object-Oriented So ftware Engineering
Assessment
Sample Multiple Choice Questions
Instructions
For each question choose the single response which best answers the question, or which completes the statement most accurately.
Topic 1: Abstraction
Question 1:
"Abstraction" is...
Being distracted by your thoughts
The classification of objects, grouped according to their significant similarities
The classification of objects, grouped according to their significant differences
The classification of objects, grouped according to their names
Hiding information inside a class so that it can only be known in an abstract manner.
Question 2:
Which of the following is
not
a type of object-oriented abstraction
Abstraction of structure
Abstraction of function
Abstraction of purpose
Abstraction of name
All of the above are types of object-oriented abstraction
Question 3:
Why is abstraction important in the real world?
Because it gives us a means of reducing complexity to a manageable degree.
Because the most important things (love, honour, justice) are all abstract
Because it is one of the foundations of the object-oriented model.
Because it allows us to ignore essential features of things
Because it gives us a way of hiding information on a "need-to-know" basis
Question 4:
Why is abstraction important in programming?
Because it gives us a means of reducing complexity to a manageable degree.
Because user-defined types are sometimes known as "abstract data types"
Because it is one of the foundations of the object-oriented model.
Because it allows us to ignore essential features of things
Because it gives us a way of hiding data on a "need-to-know" basis
Question 5:
Which of the following C constructs is an abstraction mechanism for the language?
Functions
Overloaded operators (e.g.
+
or
/
)
Function pointers
All of the above
None of the above
Topic 2: Encapsulation
Question 6:
What is "encapsulation"?
The division of a program into independent modules
The enforcement of data hiding within a class
The aggregation of data members within a class
The aggregation of function members within a class
Taking medication to help you program better
Question 7:
Which of the following are benefits of encapsulation?
Smaller executable and faster execution of code
Localizes effects and therefore errors
Prevents memory leaks and scope violations
Automatic error messages
None of the above
Question 8:
Which of the following is a drawback of encapsulation?
Can't be used in non-OO programming languages.
Data hiding must be checked and enforced at run-time, so code may run slower.
Data can only be accessed through specified interface functions, so executable may be larger and run slower.
It prevents polymorphism
None of the above
Question 9:
If computing is about making data available in useful forms, why is data hiding important?
Because some data is too sensitive to be made generally available
Because some data should only be accessed in well-defined, well-controlled ways
Because some data cannot be made available in useful forms.
Because some data may be incorrect
Computing isn't about making data available.
Question 10:
How does encapsulation relate to abstraction?
Encapsulation is a type of abstraction: abstraction of privilege
Encapsulation is a type of abstraction: abstraction of structure
Encapsulation is a type of abstraction: abstraction of function
Abstraction is a type of encapsulation: encapsulation of concept
It doesn't. They are entirely separate concepts.
Topic 3: Typing
Question 11:
What is "weak typing"?
A physiological difficulty similar to RSI.
When a computer language doesn't have a type mechanism
When a computer language doesn't require a type mechanism
When a computer language doesn't enforce its type mechanism
When a computer language doesn't know about its type mechanism
Question 12:
What is "strong typing"?
A language is "strongly typed" if every object has a unique type
A language is "strongly typed" if every object has a type which can be determined at compile-time
A language is "strongly typed" if its various typing rules are strictly enforced without exception
A language is "strongly typed" if its various typing rules are strictly enforced with only specified exceptions (e.g. casts)
A language is "strongly typed" if its various keywords must be specified in UPPER CASE.
Question 13:
What is "static typing"?
Where the type of an object never changes ("is static")
Where the type of an object is a fuzzy concept ("has static")
Where the type of an object is determined at compile-time
Where the type of an object is determined at run-time
Where the type of an object is determined only in its definition file (i.e. like static variables and functions)
Question 14:
What is "dynamic typing"?
Better than 100 words per minute
Where the type of an object is determined at compile-time
Where the type of an object is determined at run-time
Where the type of an object may change over time
Where the type of an object may change at various points in the code
Question 15:
Which kind of typing does C have?
Weak static typing
Weak dynamic typing
Strong static typing
Strong dynamic typing
Strong weak typing
Question 16:
Which kind of typing does C++ have?
Weak static typing
Weak static and dynamic typing
Strong static typing
Strong static and dynamic typing
Weak strong typing
Topic 4: Inheritance
Question 17:
What is "inheritance"?
A relationship in which the structure and functionality of a class (the "child") is defined in terms of the structure and functionality of another (the "parent").
A relationship in which the structure and functionality of a class (the "parent") is defined in terms of the structure and functionality of another (the "child").
A relationship in which the structure of a class includes one or more instances of another.
A relationship in which the functionality of a class makes calls to the functionality of another.
All of the above
Question 18:
Why is inheritance useful?
Because it prevents inherited properties from being lost
Because it minimizes the amount of code which has to be written
Because it creates elegant tree structures
Because it divides objects up into useful classes
Because it prevents polymorphism
Question 19:
In the C++ programming language what kinds of things can be inherited?
Data members, function members, nested types, nested enums, friendship
Data members, function members, nested types, nested enums,
Data members, function members,
Only data members
Only function members
Question 20:
What is the relationship called between a class and its public parent class?
"...is a..."
"...has a..."
"...is implemented as a..."
"...uses a..."
"...becomes a..."
Question 21:
What is the relationship called between a class and its private parent class?
"...is a..."
"...has a..."
"...is implemented as a..."
"...uses a..."
"...becomes a..."
Question 22:
What is "multiple inheritance"?
When a parent class has two or more child classes
When a base class has two or more derived classes
When a child class has two or more parent classes
When a child class has both an "is a" and a "has a" relationship with its parent class
Where two classes inherit from each other
Question 23:
Why do we say that multiple inheritance creates "directed acyclic inheritance graphs"?
Because it sounds technical
Because in the presence of multiple inheritance, inheritance hierarchies may no longer have a strict tree-like structure
Because it is possible to draw a multiple inheritance relationship directly
Because it is not possible to draw a multiple inheritance relationship directly
Because in the presence of multiple inheritance, inheritance hierarchies must always form loops
Question 24:
How does inheritance relate to abstraction?
A base class is an abstraction of all its derived classes
A derived class is an abstraction of all its base classes
Base and derived classes are abstractions for each other
Inheritance prevents abstraction
There is no relationship between inheritance and abstraction
Question 25:
What is the difference between public and private inheritance in C++
Publicly derived classes inherit only the public data members, whereas privately derived classes inherit only the private data members
Publicly derived classes inherit both the public and private data members, whereas privately derived classes inherit only the private data members
Public inheritance makes the public members of the base class public in the derived class; private inheritance makes public base class members private in the derived class
Private inheritance changes the default accessibility for new members of a derived class to
private:
whereas public inheritance leaves the default for new members as
public:
Public inheritance represents an "is implemented as" relationship, whereas private inheritance represents an "is a" relationship
Question 26:
Which is the correct syntax if we wish class
D
to publicly inherit from class
B
?
class D: public: B {};
class D: public B {};
class D public: B {};
class B: public D {};
class B public: D {};
Question 27:
Why are private members of the base class not (directly) accessible in the derived class
Because they're not inherited, so they don't exist in the derived class
Because, if they were accessible, it would provide a way to break the encapsulation of a base class
Because private members are not even accessible to the base class
Because then there would be no use for the
protected:
keyword
It's a trick question - they
are
directly accessible in the derived class.
Question 28:
What is the accessibility of a
protected:
member of a base class which is inherited privately?
private:
, because the private inheritance makes everything from the base class private in the derived class
protected:
, because it wasn't public in the base class, it doesn't become private in the derived class
public:
, because accessibilities add:
private: + private: = protected:
,
protected: + private: = public:
, etc.
Inaccessible. Private inheritance makes all non-
public:
members of the base class inaccessible in the derived class
None. It's a compile-time error to privately inherit a
protected:
member
Question 29:
If a derived-class object is created and later destroyed what is the order of the constructor and destructor calls on the object
Base()
,
Derived()
, ... ,
~Base()
,
~Derived()
Derived()
,
Base()
, ... ,
~Derived()
,
~Base()
Base()
,
Derived()
, ... ,
~Derived()
,
~Base()
Derived()
,
Base()
, ... ,
~Base()
,
~Derived()
Derived()
, ... ,
~Derived()
Topic 5: Polymorphism
Question 30:
What is "polymorphism"?
When a given stimulus produces a unique response depending on the type of object stimulated
When a unique stimulus produces a common response for all objects stimulated
When the compiler determines the unique response to a stimulus, based on the type of the object stimulated
When the user determines a given response to a stimulus, by selecting the type of object which is stimulated
When a T-1000 terminator morphs itself into a giant parrot
Question 31:
How does polymorphism relate to abstraction?
Polymorphism is a mechanism for abstraction of functionality
Polymorphism is a mechanism for abstraction of structure
Polymorphism is a mechanism for abstraction of naming
All forms of abstraction are polymorphic
There is no relationship between polymorphism and abstraction
Question 32:
How does polymorphism relate to inheritance?
Polymorphism relies on inheritance to ensure that derived classes have the necessary capacity to receive a particular stimulus
Polymorphism relies on inheritance to ensure that no two classes respond identically to a particular stimulus
Polymorphism is the same as inheritance. The two concepts are identical
Polymorphism is the opposite of inheritance. The two concepts are mutually exclusive
There is no relationship between polymorphism and abstraction
Question 33:
What is "dynamic dispatch"?
When the function to be executed in response to a function call is determined very quickly (also known as "in-lining").
When the function to be executed in response to a function call is determined at run-time.
When the function to be executed in response to a function call is determined at compile-time.
When the function to be executed in response to a function call is executed at compile-time.
When the function to be executed in response to a function call is determined at the
end
of the function call.
Question 34:
Why is it possible in C++ to make a base-class pointer point to a derived-class object
Because a derived-class object has all the properties (data and functions) of a base-class object, so it can be treated just like one for all intents and purposes (including being pointed at)
Because the compiler can automatically convert any base-class object to any required derived class
Because pointers in C++ aren't type-checked
All of the above
None of the above
Question 35:
If the pointer
p
is a pointer to a base class (
B
), but actually points to an object of a derived class (
D
), which member function gets called when the call
p->Print()
is executed?
B::Print()
D::Print()
B::Print()
if
B::Print()
is not virtual,
D::Print()
if
B::Print()
is virtual
D::Print()
if
B::Print()
is not virtual,
B::Print()
if
B::Print()
is virtual
Neither. The compiler flags it as an ambiguous case.
Question 36:
If a member function (
void B::Reset(void)
) is virtual in a base class
B
, which of the following declarations make the function
D::Reset()
non-virtual in the derived class?
class D : public B { static void Reset(void); };
class D : public B { !virtual void Reset(void); };
class D : public B { ~virtual void Reset(void); };
class D : public B { void Reset(void); }; // NO KEYWORD
None of them. Once a function is virtual in a base class, it stays virtual in every derived class.
Question 37:
Why can't the compiler "hard-code" direct calls to virtual functions?
Because hard-coding the function call would slow down compilation of the program too much
Because hard-coding the function call would slow down execution of the program too much
Because the correct function to call generally isn't known at compile-time
Because virtual functions are always called at compile-time so no run-time code is needed at all.
The compiler
does
hard-code direct calls to virtual functions
Question 38:
The compiler generally replaces a virtual function call with some code like:
(*((baseptr->_vtab)[0]))()
. Which of the following steps does that code
not
perform
Follows the
baseptr
pointer to the secret
_vtab
field of the object being pointed to
Checks to see that the
_vtab
pointer is not 0
Goes to the first element of the virtual table pointed to be the
_vtab
field
Looks up the function pointed to by that first element
Calls that function
Question 39:
Why does a class's destructor sometimes have to be specified as
virtual
?
Because it may never be called
Because it may be called through a pointer (or reference) to a base class
Because it may be called through a pointer (or reference) to a derived class
Because it may be called at run-time
Destructors
can't
be made virtual
Topic 6: Genericity
Question 40:
What is "genericity"?
When data structures and functions are specified without the details of the types on which they operate.
When data structures and functions are specified without details of their name.
When data structures and functions are specified in separate header (".h") and source (".c") files
Saving money by not using a "name-brand" compiler.
None of the above
Question 41:
How does genericity relate to abstraction?
Genericity is the abstraction of structure
Genericity is the abstraction of functionality
Genericity is the abstraction of naming
Genericity is the abstraction of type information
Genericity is the abstraction of encapsulation
Question 42:
Why isn't it always sufficient just to provide a generic version of a particular function?
Because its semantics may not be correct when specific types are inserted
Because its syntax may not be valid when specific types are inserted
Because its behaviour may not be desired when specific types are inserted
All of the above
None of the above
Question 43:
In C++, a template can have the following as template parameters in its angled brackets:
One or more types, preceded by the
class
keyword.
One or more integral variables, preceded by their type names.
One or more variables of any type, preceded by their type names.
One or more types, preceded by the
class
keyword,
and
one or more integral variables, preceded by their type names.
One or more types, preceded by the
class
keyword,
and
one or more variables of any type, preceded by their type names.
Question 44:
Function templates in C++ are specified using which keyword(s)?
template
template function
virtual
generic
const
Question 45:
A "template specialization" is:
A special class used in a normal template definition.
An object which is an instance of a templated class.
A special version of a templated class or function for a specific template parameter value.
A non-templated class or function with the same name as a templated class or function.
None of the above.
Topic 7: Exceptions
Question 46:
An exception is:
an unusual state that the program enters only rarely.
an interrupt (or signal) received by the program from the operating system.
an object which propagates up the call stack looking for an error handler.
an object which propagates down the call stack looking for error conditions to handle.
a "net" placed around a piece of code, to catch any errors.
Question 47:
In C++ exceptions will only be caught when they are thrown by code:
which is physically located in a
try
block.
which has been called from a
try
block.
which is physically located in a
catch
block.
which has been called from a
catch
block.
which has not yet executed.
Question 48:
As an exception propagates it:
destructs any locally-declared objects created in any function through which it passes.
destructs any dynamically-allocated objects created in any function through which it passes.
destructs any locally-declared or dynamically-allocated objects created in any function through which it passes.
does not destruct any objects created in any function through which it passes.
only destructs objects declared in the
try
block which eventually catches it.
Question 49:
One advantage of using exceptions (as opposed to other error-handling techniques) is that:
You don't have to specify how the code should handle the error, because the compiler takes care of that.
You don't have to specify where the exception should be thrown, because the compiler takes care of that.
You don't have to put error-handling code in every function, only those that detect or handle errors.
You don't have to worry about your program terminating, since exceptions never cause a program to exit.
Exceptions are built into the C++ language.
Question 50:
If a
try
block has two or more associated
catch
blocks, which of them will be triggered by an exception?
The first one whose
catch
parameter type matches that of the exception.
The last one whose
catch
parameter type matches that of the exception.
The one whose
catch
parameter type most closely matches that of the exception.
Every one whose
catch
parameter type matches that of the exception.
The only one whose
catch
parameter type matches that of the exception. If two or more
catch
blocks would match, the compiler flags an ambiguity.
Topic 8: The Standard Template Library
Question 51:
The
string
class encapsulates:
the data and functions of an inbuilt
char*
string
only the data of an inbuilt
char*
string
only the functions of an inbuilt
char*
string
the data and functions of a sequence of
char*
's
None of the above.
Question 52:
Suppose the string
s
holds the characters "examination". What will
s
hold after the following statement:
s.replace(2,1,"ter")
"exaternation"
"examinater"
"extermination"
"teramination"
"termination"
Question 53:
If
s
is a
string
holding the character "a", what is the effect of the statement:
s += 2;
s
holds "a2"
s
holds "a\002"
s
holds "aaa"
It's a compiler error
It's a run-time error
Question 54:
Name of the
deque
class comes from:
the acronym "Double Ended QUEue"
the acronym "Dynamically Extended QUEue"
the acronym "Discrete Elements, Quantised Under Extension"
the name of woman who invented it: Marie Alperìn de Qué
the initials of the French ISO sub-committee ("Domaine Elévè Qui Utilisant les Extensiones") which proposed its inclusion in the Standard Template Library.
Question 55:
The
deque
and
list
classes are both optimized for:
insertion at the end of the sequence.
insertion at the start of the sequence.
insertion in the middle of a sequence.
insertion at either end of a sequence.
completely different things.
Question 56:
The member function
push_back()
has what effect on a
list
,
vector
or
deque
object?
It creates a new slot at the end of the container (the slot is uninitialized)
It pushes a value back onto the start of the container.
It pushes a value back onto the end of a container.
It pushes a value back off the end of a container.
It undoes the last deletion of an element in the container.
Question 57:
The type name
map<int,string>
produces a type with essentially the same characteristics and abilities as:
list<string>
map<int,char*>
map<string,int>
vector<int>
vector<string>
Question 58:
The
complex
class template may only be given certain types as its template parameters:
int
,
float
, or
double
int
,
long
, or
double
int
,
float
, or
char*
int
,
double
, or
long double
float
,
double
, or
long double
Question 59:
The <complex> header file also declare overloaded an overloaded versions of which of the following functions:
qsort()
exp()
trunc()
fact()
All of the above.
Topic 9: Function pointers
Question 60:
What is a function pointer useful for?
Telling the hardware which function is to be called next
Providing a form of polymorphism in imperative languages (such as C)
Linking a series of function calls (analogous to a linked list of data)
Ensuring that a function returns to the correct place in the code, after it executes
Passing parameters to a function in a language which does not have references
Question 61:
Which of the following is a valid C/C++ function pointer definition
int *(f)();
int* f();
(int*)f();
(int* f)();
None of the above
Question 62:
Which of the following declares a pointer to a function
g
, which takes two ints and returns nothing?
(*g)(int*2);
(*g)(int,int);
void (*g)(int,int);
(*g)(int,int) = void;
*(void g(int,int));
Question 63:
Which of the following is a correct call to the function pointed to by the function pointer
g
?
g->(1,2);
g(1,2);
*g(1,2);
(*g)(1,2);
void (*g)(1,2);
Question 64:
What is the relationship between function pointers and polymorphism?
Function pointers allow us to implement a form of polymorphism
Function pointers allow us to prevent polymorphism
Function pointers are a necessary prerequisite for polymorphism
Function pointers make polymorphism necessary in a program
There is no relationship between function pointers and polymorphism
Topic 10: I/O
Question 65:
What is the general syntax for doing output in a C++ program?
cout << var1 << var2;
cout >> var1 >> var2;
var1 >> var2 >> cout;
var1 >> cout << var2;
cout <<var1,var2>>;
Question 66:
What is the general syntax for doing input in a C++ program?
cin << var1 << var2;
cin >> var1 >> var2;
var1 >> var2 >> cin;
var1 >> cin << var2;
cin <<var1,var2>>;
Question 67:
What is the purpose of the
cin
object?
To represent an input stream
To represent an output stream (i.e. one which we can put values in)
To represent the
process
of input
To act as a receptacle to put values in
None of the above
Question 68:
What is the purpose of
endl
in C++ I/O.
It is used at the end of output statements instead of a semicolon.
It instructs the output object to print a newline character, but not to flush its buffer.
It instructs the output object to print a newline character and then to flush its buffer.
It instructs the output object to flush its buffer and then to print a newline character
None of the above
Topic 11: Dynamic memory
Question 69:
What is the name of the operator which allocates single objects dynamically?
new
new[]
ClassName
(where
ClassName
is the name of the desired class)
~ClassName
(where
ClassName
is the name of the desired class)
create
Question 70:
What is the name of the corresponding deallocation operator?
dealloc
delete[]
delete
~ClassName
(where
ClassName
is the name of the desired class)
None of the above
Question 71:
Apart from reserving the required memory, what else do the allocation operators do?
Automatically deallocate the memory when it goes out of scope
Automatically deallocate the memory when it is is no longer accessible
Calls the constructor(s) for the specified type
Calls the destructors(s) for the specified type
All of the above
Question 72:
Apart from reclaiming the specified memory, what else do the deallocation operators do?
Automatically deallocate the memory when it goes out of scope
Automatically deallocate the memory when it is is no longer accessible
Calls the constructor(s) for the specified type
Calls the destructors(s) for the specified type
None of the above
Topic 12: References
Question 73:
What is a "reference"?
A synonym for "pointer"
Another name for an object
Another name for a type
A way of copying objects without extra memory
A name for any parameter to a C++ generic type
Question 74:
Which of the following statements declares a reference named
refname
?
ref refname = var&;
int refname = &var;
int& var = refname;
int& refname = var;
refname = int& var;
Question 75:
Once a reference is declared, how can it be distinguished from the original object it references?
They have different addresses (i.e. use the
&
operator)
They have different sizes (i.e. use the
sizeof()
function)
They have different types (i.e. use the
typeid()
function)
They have different scopes (i.e. test for a call to their destructors)
A reference
can't
be distinguished from the original object it references.
Question 76:
What is a "reference parameter"?
A reference which is used as an argument to a function call
A function parameter which is a reference
A reference which refers to a function parameter
A parameter which is passed to a reference
A parameter which is used to initialize a reference
Question 77:
What are the advantages of passing arguments by reference?
Changes to parameter values within the function also affect the original arguments.
There is need to copy parameter values (i.e. less memory used)
There is no need to call constructors for parameters (i.e. faster)
All of the above
None of the above
Question 78:
What are the disadvantages of passing arguments by reference?
Changes to parameter values within the function also affect the original arguments.
It's slower, because constructors cannot be used.
Because the binding of references is fixed (unlike pointers), the value of a reference parameter can't be changed within the function.
All of the above
None of the above
Question 79:
In what ways are references and pointers similar?
Both provide a mechanism for accessing some other piece of memory.
Same declaration syntax.
Both must be dereferenced before use.
Both are first class objects in C++.
Both are always more compact (use less memory) than the objects to which they refer (or point).
Topic 13: Classes
Question 80:
What is a "class"?
A collection of objects of various types
A description of the structure and functionality of a specific type of object
An abstraction of the purpose of an object
A description of the structure and functionality of a specific type of object, but with no actual function code (i.e. just prototypes).
A link in a directed acyclic inheritance graph
Question 81:
What kinds of members can a class have?
Data members
Data members, function members
Data members, function members, children
Data members, function members, children, instances
Data members, function members, children, instances, friends
Question 82:
What is "access" in the context of a C++ class?
Whether a given object of the class is accessible at a particular point in the code (this is determined at run-time)
Whether a given member of the class is accessible at a particular point in the code (this is determined at run-time)
Whether a given object of the class is accessible at a particular point in the code (this is determined at compile-time)
Whether a given member of the class is accessible at a particular point in the code (this is determined at compile-time)
Whether a given dynamically-allocated object is accessible at a particular point in the code (i.e. whether there is at least one accessible pointer to it)
Question 83:
What kinds of access can a class member have?
public or private
public, protected, or private
public, protected, private, or friend
Static, dynamic, or late-bound
None. Class members aren't accessible because of encapsulation
Question 84:
How are classes related to the concept of abstraction?
Classes are the C++ mechanism for abstraction of functionality
Classes are the C++ mechanism for abstraction of structure
Classes are the C++ mechanism for abstraction of functionality
and
structure
Classes are an alternative to abstraction.
Classes are an encapsulation mechanism and not related to abstraction at all.
Question 85:
How are classes related to the concept of encapsulation?
Classes provide an important alternative to encapsulation in C++
Classes provide an important mechanism for encapsulation in C++
Classes provide the
only
mechanism for encapsulation in C++
Classes encapsulate the object-oriented model
Classes are an abstraction mechanism and not related to encapsulation at all.
Topic 14: Constructors and destructors
Question 86:
What is a constructor?
An operator like
new
or
new[]
, which creates objects
A function which is automatically called whenever an object is created
An object which is automatically created whenever a function is called
A term for any of the above
None of the above
Question 87:
Why is a constructor useful?
Because it gives us a way of allocating memory dynamically
Because it ensures that objects are properly initialized
Because it ensures that object stay in their original scope
Because it allows us to delay the creation of an object until it is actually used
Because is hides the details of object creation from the user
Question 88:
What is a destructor?
An operator like
delete
or
delete[]
, which destroys objects
An exception which is "thrown" when a fatal error is encountered
A function which is automatically called whenever an object ceases to exist.
A function which is automatically called whenever a dynamically- allocated object goes out of scope.
A function which is can be called to remove any inaccessible dynamically-allocated objects
Question 89:
Why is a destructor useful (and sometimes essential)?
Because it's the only way to reclaim leaked memory
Because it ensures that objects "clean up after themselves"
Because it makes it possible to write very subtle code
Because it improves the speed of a program, by reducing the number of statements in the source
Because objects cannot be destroyed without a destructor.
Question 90:
Why can a class have many constructors, but at most one destructor?
Because destructors are much more expensive than constructors
Because destructors can only be called once, whereas constructors may be called more than once
Because the destructor never takes arguments, so the only possible parameter list for a destructor is "(void)"
Because destructors are always called at the end of a block, whereas constructors can be called anywhere in the code
Because destructors are a negative concept, and Stroustrup wanted to minimize negative influences in C++
Question 91:
The class
List::Node
has a two parameter constructor:
Node(const DataType& data, Node* next) :myData(data), myNext(next)
What type of functions are called by
myData(data)
and
myNext(next)
?
Templated functions
Copy constructors
Default constructors
Default copy constructors
Virtual functions
Question 92:
The class
List::Node
has a two parameter constructor:
Node(const DataType& data, Node* next) :myData(data), myNext(next)
Where is the function called by
myNext(next)
defined ?
In the
List
class definition
In the
Node
class definition
In the
DataType
class definition
In the compiler
In the C++ language
Topic 15: Function overloading
Question 93:
What is "function overloading"?
When a single function does more than one job in a program
When a single function has more than one definition in a program
When two or more functions have the same name and parameter types
When two or more functions have the same name but different parameter types
When two or more functions have different names but the same parameter types
Question 94:
Why is function overloading useful?
It conserves identifiers
It allows us to give related functions a common (and logical) name
It allows us to pass the same arguments to different functions
It reduces the total number of functions, therefore improving program performance
It increases the total number of functions, therefore improving program flexibility
Question 95:
What is the "signature" of a function?
The binary pattern it forms when converted to assembler
A technical term for the unique name of the function
A technical term for the unique combination of the name and parameter types of a function
A technical term for the unique combination of the name, parameter types, and return type of a function
None of the above
Question 96:
How does the compiler work out which version of an overloaded function to call?
It calls the first function it finds with the correct name
It calls the "most recently defined" function
It calls the fastest available function with the correct name
It calls the function with the "unique closest" signature
It calls the function with the "unique longest" signature
Question 97:
How can a call to an overloaded function be ambiguous?
Its name might be misspelled
There might be two or more functions with the same name
There might be two or more functions with equally appropriate signatures
The function might have the right signature, but be inaccessible
The function might be polymorphic
Topic 16: Operator overloading
Question 98:
Why is operator overloading sometimes desirable
To change the precedence of inbuilt operators for user-defined classes
To make user-defined classes act more like inbuilt classes (i.e. to make them more intuitive to use)
To improve the performance of operations between inbuilt types
All of the above
None of the above
Question 99:
Which is the correct syntax to define an overloaded assignment operator for assigning object of class
Y
to objects of class
X
void operator=(Y& to, const X& from);
void operator=(X& to, const Y& from);
void Y::operator=(const Y& from);
void X::operator=(X& to, const Y& from);
void X::operator=(const Y& from);
Question 100:
Which of the following operators
cannot
be overloaded?
.
::
**
?:
All of the above cannot be overloaded.
Question 101:
If a binary operator is overloaded
as a member function
, how many parameters will the member function require?
None. Both operands are passed via the object.
One, to pass the second operand. The first operand is the object itself.
Two, to pass the first and second operands.
Three, to pass the first and second operands, and the object on which they were called.
It's a trick question - binary operators
can't
be overloaded at all.
Question 102:
If a binary operator is overloaded
as a non-member function
, how many parameters will the member function require?
None. Both operands are already known.
One, to pass the first operand. The second operand will be a member of the first.
Two, to pass the first and second operands.
It's a trick question - binary operators
can't
be overloaded as global functions, only as member functions of a class.
It's a trick question - binary operators
can't
be overloaded at all.
Question 103:
Why is it necessary to be able to overload some operators by specifying a global function (rather than a member function)?
Because member functions are inherited
Because member functions are slower than global functions
Because inbuilt types can't have member functions
Because sometimes the order of arguments puts an unmodifiable class as the first operand
Because some operators are commutative (the order of operands doesn't matter) so we have to use a global function which will accept operands in either order.
Question 104:
You can't have two or more overloadings of the same operator in a single class because:
...operator overloading is different from function overloading
...all operators of a class take the same first argument type, so any call would be ambiguous
...every operator name has to be unique in its original scope
...operator look-up has to be done at compile time, but the compiler can't know what the run-time operands to an operator will be
You
can
have two or more overloadings of the same operator in a single class, as long as their signatures are distinct.
Question 105:
If both
MyClass::operator+
and
MyClass::operator=
are overloaded, what is the effect on
MyClass::operator+=
?
None. The three operators are completely independent.
MyClass::operator+=
will automatically be overloaded to call
MyClass::operator+
and then
MyClass::operator=
.
MyClass::operator+=
will automatically be overloaded to call
MyClass::operator=
and then
MyClass::operator+
.
MyClass::operator+=
will automatically be made invalid, and the error message will suggest that the user use
MyClass::operator+
and
MyClass::operator=
instead.
None of the above.
Question 106:
Why can we say that operator overloading is a form of polymorphism?
Because overloaded operators can be declared
virtual
.
Because overloaded operators mean that code like
a+b
can do different things depending on the type of the objects
a
and
b
.
Because polymorphism is the technical name for operator overloading.
Because overloaded operators have many (
poly
) shapes (
morphus
).
We
can't
say that, because it's not true.
Topic 17:
const
member functions
Question 107:
What is a "
const
member function"?
One which always returns the same value
One which always returns the same values, given the same arguments (i.e. a "mathematical function)
One which takes only
const
(or
const
reference) parameters
One which is safe to call on a
const
object
One which is safe to call from
const
object's function members
Question 108:
Why are such member functions necessary?
They ensure that constants don't change during execution
They ensure that member functions don't change during execution
They ensure that the data of an object doesn't change during execution
They ensure that the type of an object doesn't change during execution
None of the above
Question 109:
What constraints does the compiler put on a
const
member function?
It cannot be overloaded, or declared virtual
It cannot change any mutable data member of the object on which it is called
It cannot change any non-mutable data member of the object on which it is called
It cannot call any other non-
const
member function of the object on which it is called
It cannot change any non-mutable data member, nor call any other non-
const
member function, of the object on which it is called
Question 110:
What is a "mutable data member"
A mutable data member is one whose value can change (i.e. not a
const
)
A mutable data member is one whose value can be changed by a
const
member function
A mutable data member is one whose type can change during execution
A mutable data member is one whose size can change (i.e. a dynamically-allocated array)
A mutable data member is one which can be optimized away by the compiler
Topic 18: Friend functions
Question 111:
A "friend" function is one which:
Belongs to a particular class, but (in some ways) acts like is doesn't.
Doesn't belong to a particular class, but (in some ways) acts like it does.
Belongs to a particular class, but can be called without referring to an object of that class.
Is a private member of a class, which exists just to "help" the public member functions.
Is a member of two or more classes at once.
Question 112:
Friend functions are useful because:
They allow us to break the encapsulation of
any
class whenever we want to, which makes coding much easier since we don't have to worry about respecting the class interface
They allow us to break the encapsulation of other user-defined classes whenever we want, thereby enabling us to improve efficiency
They allow us to break encapsulation in a controlled manner, which ensures that efficiency does not compromise maintainability
They prevent non-overloaded functions from getting lonely
None of the above
Question 113:
A friend of a class is also automatically a friend of
its base class(es)
its derived class(es)
any other friends of the class
all of the above
none of the above
Question 114:
Apart from
operator=
, the operators most commonly overloaded are
operator<<
and
operator>>
. Why?
Because left- and right-shifting is a very common task in programs.
Because they are the easiest to overload.
Because they can be member functions or global functions.
Because they make it easy to do I/O on user-defined classes.
Because in early versions of C++, they were the only operators which could be overloaded.
Question 115:
Why is it bad practice to overload
operator+
to perform subtraction, or
operator/
to perform multiplication?
Because it makes the code ambiguous, so it won't compile.
Because it can confuse the compiler, causing it to compile, but generate an incorrect executable.
Because it can cause run-time crashes by corrupting the computer's ALU.
Because it makes the code much harder to read, understand, and maintain.
Because it violates the laws of mathematics.
Topic 19: Software Engineering
Question 116:
Software Engineering is best described as:
the practice of designing, building, and maintaining off-the-shelf software from prefabricated parts.
the practice of designing, building and maintaining ad-hoc software without the use of formal methods.
the practice of designing, building and maintaining reliable and cost-effective software using standard techniques.
the practice of designing, building and maintaining fast and flexible software specifically for Engineering applications.
the practice of designing, building and maintaining flashy, cheap and buggy software engineered to generate large initially sales and an on-going market for updates.
Question 117:
The software crisis is:
How expensive software is to develop.
How long it takes to build software.
How hard software is to write.
How quickly software becomes obsolete.
All of the above.
Question 118:
The software crisis exists because:
Programmers are lazy and managers are ignorant.
There is as yet no proven scientific method for building robust, efficient, reliable and cost-effective software.
There can never be a proven scientific method for building robust, efficient, reliable and cost-effective software.
The are proven scientific methods for building robust, efficient, reliable and cost-effective software, but they are too difficult for most software developers to understand.
The are proven scientific methods for building robust, efficient, reliable and cost-effective software, but they are being suppressed by the multinational software development conglomerates, who rely on selling annual software updates and bug-fixes.
Question 119:
What is the single largest computer-related cost for most organizations?
Software analysis and design.
Software implementation.
Software testing.
Software maintenance.
Coca Cola and pizza.
Topic 20: Analysis
Question 120:
What is the analysis phase of software engineering?
Where the organization decides what software it needs to develop.
Where a software engineer determines the requirements for a software system.
Where consultant psychologists are brought in to remedy personality problems which are delaying a software project.
Where a software design is analysed for correctness.
Where the cost-benefits analysis of a proposed system design is made.
Question 121:
"Analysis requires the software engineer to become 'consciously expert' in the domain". This means:
The software engineer has to be conscientious about how they deal with experts.
The software engineer has to have a good and trained mind (i.e. an "expert consciousness")
The software engineer has to learn what to do in the domain, without thinking about how that knowledge was achieved.
The software engineer has to learn what to do in the domain, and be aware of what it is that the are doing.
The software engineer doesn't have to learn what to do in the domain, because it is enough to identify those experts who already do.
Question 122:
The three stages of the analysis phase are:
Discovery, design, implementation
Discovery, refinement, design
Discovery, modelling, design
Discovery, refinement, modelling
Refinement, design, modelling
Question 123:
The outcome of the analysis phase is:
Sufficient understanding of the problem to suggest a solution (or solutions)
Sufficient understanding of the problem to write a formal description of it
Sufficient understanding of the problem to write a requirements specification
Sufficient understanding of the problem to write a design specification
Sufficient understanding of the problem to write a code specification
Question 124:
A requirements specification is:
A rough list of things that the proposed software ought to do.
A precise list of things that the proposed software ought to do.
A formal list of things that the proposed software must do.
A mathematical specification of the exact behaviour of the proposed software.
An estimate of the resources (time, money, personnel, etc.) which will be required to construct the proposed software.
Topic 21: Testing and integration
Question 125:
The testing phase of software development
doesn't
s require:
testing that the implementation compiles correctly.
testing that the implementation matches the design.
testing that the implementation matches the requirements.
testing that the components of the implementation work separately and together.
testing that the implementation interacts correctly with the environment.
Question 126:
"In situ" testing is another name for:
Verifying that all code components fit together correctly.
Verifying that the code runs correctly on any platform.
Verifying that the code runs correctly on the specific platform it was developed on.
Verifying that the code runs correctly on the specific platform it is to be deployed on.
Verifying that the code obeys the software engineering dictum: "cum in situ doon ava quoppa te".
Question 127:
Integration is important because:
it ensures that the software is familiar to those who will use it.
it ensures that the software is "friendly" to those who will use it.
it ensures that the software works where it is to be used.
it ensures that the software replaces the existing system simultaneously everywhere it is to be used.
it ensures that the software is not installed until the old system has been removed.
Topic 22: Maintenance
Question 128:
System maintenance is necessary because:
Humans never get it right the first time.
The deployment platform may change over time.
The user's needs may change over time.
All of the above.
None of the above.
Question 129:
Maintenance may involve:
only additional coding and testing.
only additional analysis and design.
only additional design, coding and testing.
any of the development phases, except analysis.
any of the development phases.
Topic 23: Software process models
Question 130:
A software process model is:
A representation of the way in which software is developed
A representation of the way in which software processes data
A representation of the way in which software is used
A representation of the way in which software may fail
An attractive young person used in the process of selling software
Question 131:
Which of the following is
not
a software process model:
The Waterfall Model
The Fountain Model
The Spiral Model
The Redwine Model
The Rainfall Model
Question 132:
The Waterfall Model is inadequate because:
Water is a continuous medium whereas code comes in discrete chunks (i.e. functions, objects, etc.), so all water-based analogies for software development are doomed to failure.
it incorrectly suggests that the sequence of development is a stately progression from stage to stage, with no backwards steps.
it incorrectly suggests that the sequence of development is a random process of rising and falling from stage to stage, with backwards progress just as likely as forwards.
it incorrectly suggests that the sequence of development is a process unpredictable in the details, but predictable in its overall effect, like a waterfall.
it incorrectly suggests that the sequence of software development is susceptible to uncontrollable external and internal forces (analogous to gravity and surface tension).
Question 133:
Gall's dictum states:
"Never give a coder an even break" (i.e. there must always be an odd number of cases in a switch statement - not counting the default case).
"In real systems, the whole is greater than the sum of the parts" (i.e. the interesting behaviour of real systems is emergent, deriving from the interactions of their many parts).
"Any sufficiently advanced software system is indistinguishable from magic" (i.e. too complex to be comprehended by an unaided human mind, without appropriate tools).
"A complex system that works is invariably found to have evolved from a simple system that works" (i.e. working systems must evolve into complexity, they cannot be made complex to begin with).
"Software expands to fill - and exceed! - the hardware available o run it" (i.e. software developers anticipate ongoing improvements in hardware, and are always be tempted to add advanced features to their systems, which will generally not work well on the hardware that is available actually at the time).
Question 134:
Exploratory programming is:
An advanced form of prototype-based development
The naive "code-compile-recode-recompile-recode-..." technique used by novice programmers
A form of programming where the system explores a "solution space" using genetic algorithms.
Implementing a range of different solutions and then comparing them for efficiency.
Implementing a solution in a variety of languages and then comparing them for efficiency.
Question 135:
The Fountain model differs from the Waterfall model in that:
It is an artificial model not a natural one
The various phases of the development process happen in the reverse order in the two models
The Fountain model allows for the development process to "fall back" to earlier phases when necessary.
The Fountain model always splits the development effort at each stage: some effort moves on to the next phase, some is directed back to review of earlier stages
There is no difference - they are two names for the same model
Question 136:
The Fountain model acknowledges that:
some development phases must begin before others.
any development phase may begin before any other.
software development is inherently a chaotic process, so nothing can be said about which phases begin before which others.
all phases actually proceed in parallel with feedback loops between them.
none of the above.
Question 137:
The Spiral model was suggested by:
Spirato Alighieri in 1792
Barry Boehm in 1988
Roger Pressman in 1988
Ian Sommerville in 1998
The ACM Advisory Committee on Software Development in 1993
Question 138:
The five general phases in the Spiral model are:
Analysis, Design, Implementation, Testing, and Review
Review, Decision, Engineering, Acceptance, and Planning
Analysis, Design, Engineering, Testing, and Payment
Review, Risk-analysis, Prototyping, Engineering, and Planning
Review, Risk-analysis, Design, Implementation, and Planning
Question 139:
Which of the following are
I}not reviewed in the various Review phases of the Spiral model?
Options
Objectives
Alternatives
Constraints
All of them are reviewed at some time.
Question 140:
The Engineering phase of the Spiral model incorporates:
implementation only
design and implementation
analysis, design, and implementation
analysis, design, implementation, and testing
analysis, design, implementation, testing, and integration
Question 141:
Which of the following increases as the Spiral model process moves "outwards"?
Risk
Profit
Time-to-delivery
Time-to-completion
None of the above
Question 142:
What did Fredrick Brooks mean when he said "There is no magic bullet..."?
Software engineers should be shot (but we're not allowed to).
The "software crisis" was an illusion that proved not to be a threat at all.
No one technique will magically kill all software development problems.
Real design problems can only be solved with real (i.e. non-magical) tools.
Systems that appear magical from the outside, are really just composed of simple code on the inside.
Question 143:
A software development model is really just:
a more complex metaphor for what happens in reality.
a theory which approximates what happens in reality
an exact isomorphism to what happens in reality
an elaboration of the abstraction of flexibility
a comforting lie we tell ourselves to maintain the delusion that we're developing software in some logical fashion.
Topic 24: Software Metrics
Question 144:
A
metric
is:
an ISO standard unit (such a metre, kilogram, etc.)
a qualitative measure of the degree to which a system component possesses a given attribute
a quantitative measure of the degree to which a system component possesses a given attribute
a qualitative attribute which determines the degree to which a system component may be measured
an attributed quantity which measures a system component in degrees
Question 145:
Why is it useful to measure aspects of a system?
Because human subjective perception is notoriously inaccurate.
Because numbers give us a way of comparing, controlling and predicting system behaviour.
Because measurements give us a way of tracking progress.
Because it gives us an assessment of the product quality.
All of the above.
Question 146:
Which of the following is
not
required when developing a metric?
a measurable property
a relationship between that property and what we wish to know
a relationship between that property and some immeasurable dimensions of the system
a consistent expression of that relationship
All of them are required.
Question 147:
What are the features of a
poor
metric?
It is complex, hard-to-measure, and persuasive.
It is complex, consistent, and language-independent.
It is simple, hard-to-measure, and has no units.
It is complex, subjective, and inconsistent.
It is complex, subjective, and persuasive.
Question 148:
Which of the following is hard to measure?
Costs (effort, time, expenditure)
Quality (robustness, reliability, stability)
Remediation (errors found during coding, testing, or after delivery)
All of them.
None of them.
Question 149:
"Lines of code" is a poor metric because:
it is language independent.
it penalizes efficient, compact coding.
it measures what matters, not what can be measured.
it was developed as a metric in the 1960's.
All of the above.
Question 150:
In McCabe's cyclomatic complexity metric code is first represented as:
A syntax graph
A data-flow graph
A flow control graph
A control-vs-command graph
None of the above
Question 151:
The cyclomatic complexity of a graph is:
the number of closed paths in the graph.
the number of independent test cases required to reach every node in the graph.
the number of edges - the number of nodes + 1.
All of the above.
None of the above.
Topic 25: Object-oriented Design
Question 152:
Object-oriented design consists of which five tasks?
Finding objects, finding classes, finding relationships, designing interactions, refinement.
Finding classes, finding relationships, designing interactions, developing a coding protocol, refinement
Finding objects, finding classes, designing interactions, developing a coding protocol, refinement
Finding objects, finding classes, finding relationships, designing interactions, developing a prototype
Finding objects, finding classes, finding relationships, developing a coding protocol, refinement
Question 153:
When using informal (natural language) description to identify objects, what parts of the description will represent objects?
All of the nouns and some of the verbs.
All of the verbs and some of the nouns.
All of the nouns and some of the adjectives.
All of the above.
None of the above.
Question 154:
Domain Analysis is an analysis technique that examines:
The experiences of the users of the existing system.
The knowledge of the experts in the existing system.
The requirements of the purchasers of the new system.
The differences between the old and new systems.
The applications (domains) of the existing system.
Question 155:
Which of the following is
not
required of a single object in a system?
a well-defined role in the problem domain
well-defined boundaries in the problem domain
a well-defined internal mechanism in the problem domain
well-defined behaviour in the problem domain
All of the above are required.
Question 156:
At the highest level classes usually fulfil one of three roles:
Client, clients, or clientele.
Client, server, or interface.
Client, server, or controller.
Client, server, or intermediary.
Source, sink, or processor.
Question 157:
Which of the following is
not
a typical relationship in an object oriented system?
Inheritance
Devolution
Instantiation
Use
Aggregation
Question 158:
Public inheritance is used to represent which relationship(s)?
Abstraction, shared interface, and shared implementation.
Abstraction, shared interface, but not shared implementation.
Aggregation, shared interface, and shared implementation.
Instantiation, shared implementation, but not shared interface.
Construction, destruction, and memory management.
Topic 26: Design Patterns
Question 159:
An example of the "source and sink" pattern is:
{{new and
delete
cin
and
cout
cout
and
cerr
operator>>
and
operator<<
Constructors and destructors
Question 160:
"Filtering" is a design pattern in which:
I/O is converted to and from ASCII.
objects in a collection are selected according to some criterion.
objects in a collection are sorted according to some criterion.
a collection of objects has some value-changing operation applied to every object in it.
None of the above.
Topic 27: Design specification
Question 161:
An interaction diagram is:
a time-line illustrating a typical sequence of calls between object function members
a call tree illustrating all possible sequences of calls between class function members
a time-line illustrating the changes in inheritance and instantiation relationships between classes and objects over time
a tree illustrating inheritance and relationships between classes
a directed acyclic graph illustrating inheritance and instantiation relationships between classes and objects
Question 162:
When refining a design, the presence of tightly-coupled classes often indicates:
an efficient design, which has maximized coupling.
an efficient design, which will maximized run-time performance.
that the classes might better be represented as single class.
that each tightly coupled class might better be represented as two or more separate classes.
All of the above.
Question 163:
Repeated code in two unrelated classes may indicate the need for:
that object-oriented design is not possible in this case.
that the code will have to be templated.
a new derived class that inherits from both of the unrelated classes.
a new base class that abstracts the common code of each of the unrelated classes.
that one class should really be an object, specifically an instantiation of the other class.
Question 164:
Which of the following is one of Stroustrup's "rules-of-thumb" for object-oriented design?
Optimize early.
Maximize your interfaces.
Design only for the current problem.
Don't use public data members.
Avoid the language of the problem domain.
Question 165:
A high degree of cohesion is desirable in an object-oriented design because:
it indicates that classes are closely-coupled.
it indicates that objects will make many calls on each other, and that the emergent behaviour of the system will therefore be complex.
it indicates that each class is largely self-contained.
it indicates that the system model used was coherent and accurate.
It's a trick question - cohesion is a bad thing in object-oriented designs.
Topic 28: Classification
Question 166:
Platonic classification is so-named because:
It was invented by Plato.
It uses a 2D search space.
It is "regular" in the geometric sense.
It is an objective (i.e. platonic) in its assessments.
It's an acronym for "Partial Left-Associative Type Organization into Non-Isomorphic Classes"
Question 167:
Platonic classification is best described as:
a "top-down" clustering technique
a "bottom-up" clustering technique
an "instance-outwards" clustering technique
a "random-walk" clustering technique
a "concept-backwards" clustering technique
Question 168:
"A priori" clustering starts with:
a set of objects that define a class.
a set of objects that define different classes.
a set of properties that define a class.
a set of rules that differentiate objects.
a set of goals for objects to achieve.
Question 169:
Prototype theory clusters objects around "paradigms". What is a paradigm?
A language model (e.g. object-oriented, imperative, or functional)
An abstraction of all objects in the class
An intersection of the common properties of all objects in the class.
An typical object (i.e. an example of the class)
An atypical object (i.e. an exception to the class)
Topic 29: The Booch Notation
Question 170:
In the Booch notation, a cloud with a dashed outline represents:
a comment or explanatory note associated with a class.
a class.
an object.
a process.
an environment.
Question 171:
In the Booch notation, a cloud with a solid outline represents:
a comment or explanatory note associated with a class.
a class.
an object.
a process.
an environment.
Question 172:
In the Booch notation, inside each class are printed:
its name, attributes, operations, and derived classes.
its name, attributes and operations.
its name, and attributes.
its name, and operations.
just its name.
Question 173:
Inheritance relationships are represented in the Booch notation by:
nesting of classes
lines with a solid circle at one end
lines with a hollow circle at one end
lines with an arrow at one end
lines without an arrow at either end
Question 174:
Use relationships are represented in the Booch notation by:
nesting of classes
lines with a solid circle at one end
lines with a hollow circle at one end
lines with an arrow at one end
lines without an arrow at either end
Question 175:
Aggregation (encapsulation) relationships are represented in the Booch notation by:
nesting of classes
lines with a solid circle at one end
lines with a hollow circle at one end
lines with an arrow at one end
lines without an arrow at either end
Question 176:
In the Booch notation, parameterized (generic) classes are represented by:
the normal class representation with a dotted arrow pointing at the template parameter classes
the normal class representation but shaded grey.
the normal class representation with a dotted outline and the names of its parameter classes listed beside it.
the normal class representation with a rectangular box in its top left-hand corner.
Its a trick question - parameterized classes can't be specified in the Booch notation.
Topic 30: Common coding mistakes
Question 177:
The following recursive insertion function is flawed.
void recInsert(DataType d) { recInsert(d);
} Which choice most accurately describes the flaw(s):
The iterative loop is missing.
The function does nothing.
The function calls itself endlessly.
The function will be "optimized away".
The function parameter is not defined.
Question 178:
A dynamic
Array
class is templated as follows:
template <class DataType> class DArray { /* ETC */ };
What is the correct syntax for declaring a dynamic array of integers using the above template?
DArray <DataType> intArray;
DArray <int> intArray;
typedef DArray intArray;
int <DArray> intArray;
DArray intArray;
This material is part of the
CSC2050 - Object-Oriented Software Engineering
course.
Copyright © Damian Conway, 1998. All rights reserved.
Last updated: Fri Sep 25 08:19:08 1998