(:wikititle CPSC 219:)

Sample Questions


  1. Explain, in detail, the general sequence of events which occur when an object is instantiated. Please note: your answer should be applicable to the instantiation of any object.

  2. Your first two assignments in this course were written in C. The second assignment required you to implement a linked list structure using pointers. Languages like Java and Python use references instead of pointers. Essentially, references are pointers but they are a lot easier to use than pointers. Did you find this to be the case? Why or why not?

  3. Object oriented analysis focuses on the development of an object model to represent the problem. In class, we have learned that the object model is a directed graph and not a regular graph.
    1. How does the fact that the object model is a directed graph (as opposed to a graph) constrain our ability to use the object model and what can the programmer to do mitigate these constraints?

    2. Why is it important that the objects within an object model are somehow connected?

  4. What is a design pattern and how are design patterns useful? What does the programmer have to be wary of if he/she decides to implement a design pattern? Include an example in your answer.

  5. When we test an object, what are we trying to accomplish? How can the use of a unit testing framework (such as JUnit) simplify the process of writing and executing tests?

  6. What is an abstract class and how are abstract classes derived? It is said that you cannot instantiate an abstract class. If this is the case, why would anyone ever use abstract classes?

  7. How is it possible to implement a procedural solution using an object-oriented language?

  8. What is polymorphism and how is it used to solve problems?