Index

Steps


We're going to model (code) a very simple house.

The components are shown in this sketch.
We have a variety of different roof types we can use.
  • GableRoof
  • FlatRoof
  • CurvedRoof
  • GreenRoof
  • ComboRoof
  • DomeRoof

We generally call any of these type "Roof"
We have a variety of different roof types we can use.
  • FrenchDoor
  • PatioDoor
  • WoodEntryDoor
  • FiberglassEntryDoor
  • SteelEntryDoor

We generally call any of these type "Door"
Time to take a cut at an object diagram.

We try to have the object diagram model (mimic) the real world or domain.

So we browse over our sketches again.
Here is an object diagram template.

The three ivars shown are just for the template.

We may have anywhere between zero to many ivars (our idea).
House
    ---- ivar1 -------- ivar1Type
    ---- ivar2 -------- ivar2Type
    ---- ivar3 -------- ivar3Type
   etc

Come up with your first try of an object diagram
House
    ---- ivar1 -------- ivar1Type
    ---- ivar2 -------- ivar2Type
    ---- ivar3 -------- ivar3Type
   etc




Conclusion


What things did we learn about coming up with object ideas?