TableOfContents

attachment:barkdifferent.jpg

1. Schedule

<project xmlns:pg="http://www.logilab.org/namespaces/pygantt_docbook" id="ooa">
<label>Object Oriented Animals</label>
<task id="JavaZ">
  <label>Java Z</label>
  <task id="workshop1">
    <label>Introduction</label>
    <duration>5</duration>
    <constraint type="begin-after-date">2005/09/07</constraint>
  </task> 
  <task id="workshop2">
    <label>Better living in Objectville: A puppy is born</label>
    <duration>5</duration>
    <constraint type="begin-after-end">workshop1</constraint>
  </task> 
  <task id="workshop3">
    <label>Serious Inheritance and Polymorphism: Bark, but bark different </label>
    <duration>5</duration>
    <constraint type="begin-after-end">workshop2</constraint>
  </task> 
  <task id="workshop4">
    <label> Powerful composition: Armed and Dangerous</label>
    <duration>5</duration>
    <constraint type="begin-after-end">workshop3</constraint>
  </task> 
  <task id="workshop5">
    <label>Something is happening: Romeo and Juliet in Objectville</label>
    <duration>5</duration>
    <constraint type="begin-after-end">workshop4</constraint>
  </task> 
</task>
<task id="uml">
  <label>UML</label>
  <duration>15</duration>
  <constraint type="begin-after-end">JavaZ</constraint>
</task>
<task id="patterns">
  <label>Design Patterns</label>
  <duration>10</duration>
  <constraint type="begin-after-end">uml</constraint>
</task>
</project>

1.1. Week 1: Introduction

Activity
  • My expections
  • Your expectations
  • Armed to the teeth: IDE (JBuilder)
  • Hello World made easy. A showcase.
  • Homework

    Please email your answers to MailTo(j.hu@tue.nl) before 5:00pm, Tuesday, Sept. 13.

  • Reproduce the Hello World example with JBuilder. send me the screenshots of the results:
    • Running "Hello World" in a JFrame. The frame has to be of size 400x300.
    • UML class diagrams from JBuilder
  • Read your favorite Java book, find out what an object, a class, a method and an instance variable is. And filling out the following "Who am I" form:

    What I do Who I am
    I am compiled from a .java file class
    My instance variable values can be different from my buddy's values
    I behave like a template
    I like to do stuff
    I can have many methods
    I represent a ''state''
    I have behaviors
    I am located in objects
    I live on the heap
    I am used to create object instances
    My state can chage
    I declare methods
    I can change at run time
  • How would you implement a system that does the following:

    There will be shapes on a GUI, a square, a circle and a triangle. When the user clicks on a shape, the shape will rotate clockwise 360 degrees (i.e., all the way around) and play an WAV sound file specific to that particular shape.
    write a proposal in plain English how such a system should be implemented in an object oriented way. No, no Java source code please. But explain why you think your solution is particularly good. When you try to write why, think of the following terms: reusable, robust, readable, extendable, encapsulation ...
  • 1.2. Week 2: Better living in Objectville: A puppy is born

    Activity
  • Understanding objects
  • Well-encapsulated dogs
  • How Objects behave
  • Life and death
  • Homework
  • Questions
    1. What's the big deal about encapsulation?
    2. What happens if the argument you want to pass to a method is an object instead of a primitive?
    3. Can a method declare multiple return values? Or is there some way to returen more than one value?
    4. Does one have to do something with the return value of a method? Can it be ignored?
    5. Guess the output of the following code (You may try out if you want:)

         1   String a = new String("Hello");
         2   String b = new String("Hello");
         3   Foo c = a;
         4   if (a == b) {System.out.println("a == b");}
         5   if (a == c) {System.out.println("a == c");}
         6   if (b == c) {System.out.println("b == c");}
      
  • Develop a small game: Sink a Unit
    • It's you against the computer, but unlike the real Battleshop game, in this one you don't place any ships of your own. Instead, your job is to sink the computer's ships in the fewest number of guesses. Oh, and we are not going to sink ships. We kill units.
    • Goal
      Sink all of the computer's Units in the fewest guesses.
      Setup
      Whe the game program is launched, the computer places 2 Units in 10 virtual cells. Imaging a floor of 10 rooms, and a Unit occupies 3 rooms on this floor. When that's complete, the game asks for your first guess. attachment:SinkAUnit.png
  • 1.3. Week 3: Serious Inheritance and Polymorphism: Bark, but bark different

    Activity
  • Dogs: Barking is an important part of our cultural identiy.
  • 1.4. Week 4: Powerful composition: Armed and Dangerous

    Activity
  • Dogs have got sunglasses, and cats too.
  • Dogs team up.
  • 1.5. Week 5: Something is happening: Romeo and Juliet in Objectville

    Activity
  • Love: Dogs, more dogs
  • Hate: Dogs like to chase cats
  • 1.6. Week 6: ...

    2. Assignment Describtion

    2.1. Assignment Introduction

    So you have done Java A and even B. Congratulations. Have you also found that Java offers something that is more than just a programming language? Do you know that Java can also make a dog bark and a cat scared? More, as a designer, you might also be able to make your ingenious design dance and sing? Better, the thinking behind Java may help you think differently.

    2.2. Target Competency Area(s), Competencies and Level(s)

    2.3. Entrance Level :Level of Prior Competency Development (Optional)

    Completed Java A and B.

    2.4. Learning Objectives

    Master object orientation and design patterns as ways of analyzing user requirements and complex products, as tools for communication with other designers and engineers, not just as a programming principle.

    With this assignment, we will try to wrap up your knowledge about Java, or any other object-oriented programming language you know (Java, C++, Object Pascal, Python, Ruby ...), to get the essence of object oriented design, to turn yourself from a craftsman back to a designer: Use object oriented principles as a tool to slice the complex into the simple, and put them together back again in a structured way.

    2.5. Learning Activities

    2.6. Deliverables

    2.7. References

    2.7.1. Previous run

    2.7.2. Online Resources

    2.7.3. References