Title: JH4 Homework
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER

JH4 Homework

Create an Eclipse project named JH4_xxxxx where xxxxx is your NetID. For example: JH4_chasselb. Create the programs described below in this project. Fill in the required fields in the JH4_worksheet.txt file. Export your project file and upload it to blackboard as your work for this assignment. The worksheet file should be pasted into the blackboard comments section.

calculator(15 points)

Create a package called calculator and create a program that solves the following problem:

Calculator Problem

Run your program applet program in Eclipse and make a JING video where you demo your program. I would like audio on this. Note that I am not asking you to get your Applet to run in a real browser because browsers make life for applets too difficult these days. A few years back this was not a big problem.

Save the JING on the JING web site so you will have a URL of your video. Place the URL in the appropriate place on the JH4_Worksheet.txt file.

********** MAC User Issues*********

For you MAC users, you may have some trouble getting the colors in the Calculator to work properly. To resolve this, you can add the following inside your constructor:


        // Mac's kind of violate some cross platform rules.
        // In case you are on a Mac, the following will restore the normal look that shows up
        // on other platforms.
        try {
            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }


Some documentation on this:

https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

https://docs.oracle.com/javase/8/docs/api/javax/swing/UIManager.html

calculator_applet(5 points)

Create a calculator_applet package. Take your code from the Calculator problem above and make the same code work as both an application and as an applet. See BasicBoth.java in the notes on "Gui Component High Level"

Run your program and make a JING video where you demo your program. I would like audio on this.
Save the JING on the JING web site so you will have a URL of your video. Place the URL in the appropriate place on the JH4_Worksheet.txt file.

second_shape_drawing(20 points)

Create a package called second_shape_drawing and create a program that solves the following problem:

Second Shape Drawing Problem

Run your program and make a JING video where you demo your program. I would like audio on this.
Save the JING on the JING web site so you will have a URL of your video. Place the URL in the appropriate place on the JH4_Worksheet.txt file.

Last Updated: October 20, 2015 9:44 PM