Unit 4 -- Csc 115 Spring 2004 SO1/S02


Learning Objectives for this week

In this unit you will learn the basic concepts underlying the following features in Java and learn how to use them to do object oriented software design:

Learning Resources for this week

Lecture slides: 4-00Design.ppt


Sample programs as found in the source directory of this project. There are also some more examples this week also in activities (see below).

Reading Assignment:

Read Chapter 2 and make sure you understand it!

Unit 4 Activities

Short Answer Questions

Answer the following questions:
  1. What are the main advantages of object oriented programming?

  2. What does "polymorphism" mean and how can we take advantage of it?

  3. What does the term "encapsulation" mean?

  4. What concept does the keyword "extends" relate to? When would you use it? How about "inherits"?

  5. Match the following words with the phrase below that closely matches the correct definition of the term: Match the terms above with these phrases:

Coding practice

  1. Load the files, explore and make sure you understand the code from the clock example. Course concepts covered: Inheritance and Polymorphism. (There are some subtle points in this example which may take some time to understand but are very important to understand before the midterm.)
  2. Try experimenting with the examples posted to go with this unit. discussed in class and in the notes! You may want to make copies of them in a different directory so you keep your original examples intact. In particular look at the music package example.

Problems in the textbook, Chapter 2:

R-2.4, 2.7 2,8, 2.10 and C-2.5 and 2.8


Go to the course website