Assigned: 10/30
Due: 11/06
NO CREDIT: 11/09
Use NetBeans 5.0 to create a new project named Homework9 in your csci/201 directory. Make sure that the full pathname of your project folder is csci/201/Homework9, since this is where the automatic grader will look for it. Follow all the defaults suggested by NetBeans, so that a class named homework9.Main is automatically created for you.
Next, download the JAR file Chapter9.jar and add it to your project as described in class. This JAR file contains the bytecodes for the classes GeometricObject, Circle, and Rectangle, all of which are defined in Section 9.2 of your text.
Finally, add a file named Triangle.java to your project, in which you define a Triangle as a subclass of GeometricObject as described in Programming Exercise 9.1, p. 338. Be sure to define your Triangle class in the same homework9 package where NetBeans wrote its freebie Main class for you.
Finally, use the main() method of the class Main to create a Triangle object and test its methods as described in Exercise 9.1.
When you have written, compiled, and run your project, test it and correct any runtime and/or logic errors. When you are satisfied that it runs correctly, open a terminal (command) window and create a JAR file named Homework9.jar containing your NetBeans project source folder, as described in class. Note: lists of basic JAR file commands are available for both Linux and Windows users.
If you created your project on one of the Computer Science lab PCs in Robinson 004, simply leave your NetBeans Homework9 project folder and your Homework9.jar file in your csci/201/ directory. If you developed it elsewhere, copy your Homework9.jar file into your Computer Science csci/201 directory. Then open a terminal window and extract your project from the JAR file, using the commands
cd ~/csci/201 jar xf Homework9.jar
201.003 Home Page | Homework | Lab Projects | Tests | Demo Projects |