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.
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:
The DwarfStar class much be a child class of the Star class. It must graphically depict a dwarf star in any fashion that you choose---let your imagination be your guide. The class must contain a draw() method but you may simply use the one that is inherited from the Star class. Note that the Star class is not commented, but you should be able to understand it using the knowledge gained from assignment 4, and by reading the comments in the modified PolyStar class.
The NovaStar class much be a child class of the Star class. It must graphically depict a nova in any fashion that you choose---again, let your imagination be your guide. The class must contain a draw() method but you may simply use the one that is inherited from the Star class.
The OuterSpace class must be an Applet, that means it must be a child of the Applet class. It's job is to test the DwarfStar and NovaStar classes. In OuterSpace, you must create and draw at least two DwarfStar objects, and two NovaStar objects. These objects may be positioned anywhere in the display as long as they are visiable. You are, of course, free to create and draw additional stars.
You must also write an html file to display your Applet and that file must be named OuterSpace.html
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:
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