CSCI 201 Spring 2003

Programming Project 5

Overview

In this assignment, you will see how using inheritance can make your life as a programmer easier. To get you started, you are given the Star class and a modified (be sure to check it out) version of the PolyStar class (which is used by the Star class). Your job is to derive two classes from the Star class: the DwarfStar class NovaStar class.

Your Assignment

To complete this assignment, you will write three classes: (1) the DwarfStar class; (2) the NovaStar class; and (3) an Applet named OuterSpace that draws dwarf and nova stars as defined by the DwarfStar and NovaStar classes. The requirements for each of these classes are as follows:

Programming Style

Note that 10% of your program grade is based on the readability of your program. This includes things like proper indentation, comments, and the naming of variables and methods. To receive full credit for your program, you are encouraged to use proper indentation as demonstrated in your text and in class room examples. You must also include a comment at the top of each program stating your name, the course, and the purpose of the program:

// Name: your name here // // Course: CSCI 201 // // Purpose: purpose of program here //

Submitting Your Program

The program written for this assignment must be turned in by transferring the three java source code files and the HTML file to your ftp directory for this class. Both the source code files (i.e., DwarfStar.java, NovaStar.java, and OuterSpace.java) and the HTML file (OuterSpace.html) should be turned in and the files must have exactly those names. You were shown how to transfer files to your class ftp directory in lab 1