Unit 3 -- 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: 3-00Design.ppt

Sample programs as found in the source directory of this project:

Reading Assignment:

Read Chapter 2 and make sure you understand it!

Activities

Short Answer Questions

Answer the following questions:
  1. What is the difference between "overriding" and "overloading"? Give an example of when you might use each of these concepts.

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

  3. For the following phrases, say if they are True or False and explain your answer

Coding Practice

  1. Explore the examples posted with your lecture slides. Also see the pirates package. There are a few questions scattered throughout the code to point out key concepts. Take as much or as little time as you like, if you get stuck, refer to your notes and textbook, and then try again! Make copies of them in a different directory so you keep your original examples intact. In particular
  2. shapes/Rectangle.java has not been fully implemented and can be extended.
  3. Load these files, explore and answer the questions we posed within the code for the Pirates, Captain, Deckhand and MainPirates classes in the pirates package. Course concepts covered: Usage modifiers, super, inheritance




Go to the course website