CMPU 235 Exam Review

The following are example of the types of questions and topics that will appear on the exam. In general you should be prepared to answer questions in the following areas:

  1. Advanced C++ concepts
  2. Basic UML notation

 

Describe the differences between the STL container classes vector, stack, queue, list, deque.

What is an iterator? What is the purpose of iterators?

You have been asked to implement a lookup table (i.e. a symbol table). Under what conditions would a hash table be an appropriate data structure? Under what conditions would a hash table be an inappropriate data structure.

What are the differences between aggregation and composition? What are the similarities?

How do virtual functions differ from non-virtual functions?

Why should destructors be declared as virtual?

What is a pure virtual function?

Provide the C++ class definitions that implement the following class diagrams

What is an association class? Give an example of an association class.

What is the fundamental reason for using UML.

Briefly describe the following models and give an example of when each might be used.

 

What are the three stages of the development process?

What are the four categories of risks that may be encountered during elboration?

What three perspectives can be used to draw class diagrams. When should each perspective be used?

What is the difference (according to the text book) between an operation and a method?

What is the difference between a class variable and an instance variable?

What does the following code fragment produce?


class Foo
{
	  static int value1;
	  int value2;
   public:
	  Foo() : value2(0) { }
	  void Print(void)
	  {
         cout << value1++ << ' ' << value2++ << endl;
	  }
};


int Foo::value1 = 0;

void main(void)
{
	  Foo foo1;
	  Foo foo2;

	  foo1->Print();
	  foo2->Print();

	  foo1->Print();
	  foo2->Print()

	  foo1->Print();
	  foo2->Print();
}