Objects

Systema Naturæ

Linnæan Taxonomy

Object Oriented Programming I: Class and Objects

A. OO-NotePad

Using the OO-NotePad sheet, observe four (4) objects in your surrounding and formally describe them usign the following descriptors:

  1. Name of the object
  2. Visual diagram / representation
  3. List of Attributes
    • Static – an attribute that does not change (much) over time
    • Dynamic – an attribute that changes aspect over time

Questions:

  1. Is there an atribute that is common to all (or some) of your objects?
  2. Do you see any familiarity between your objects?
  3. Is there any hierarchical realtionship(s) that could be devise between your objects?

B. OO Modeling

Following your OO obervations, formalise your (paper) descriptions using the Unified Modeling Language (UML)

Questions:

  1. Do you think the UML translates well your observation?
  2. Do you understand the difference between UML’s attribute and method?
  3. Is your UML diagram readable?

C. OO Programming

Now that you have created a simple UML diagram of your objects, translate this diagram into code using a class.

class Name {
	...
};

Questions:

  1. How does your class relate to your UML diagram?
  2. How does your class relate to your paper observation?
  3. Was it easy to translate your UML diagram into code? What was ambiguous? What was not?
  4. Is your class readable?

Object Oriented Programming II: Polymorphism and Inheritance