Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSC295 java Programming Language Part I Study and run the program Snowman java from Chapter 2 page 102 Hint: Snowman.java is an Applet which means

image text in transcribed
CSC295 java Programming Language Part I Study and run the program Snowman java from Chapter 2 page 102 Hint: Snowman.java is an Applet which means it should be embedded to a web-browser. In this class we can use a utility to run Applets. Following the steps to run the original snowman a. Save the Snowman, java into a directory of your desire. For example, I save mine in CiTemp directory b. Create a file: Snowman.htmil with two lines in it and save it to CiTemp clappletp c. At the command prompt, type od CATemp d. At the command prompt, type dir. You should see both Snowman,java and Snowman html in there e At the command prompt, type javac Snowman java f. At the command prompt. type appletviewer Snowman.html-the snowman should be displayed in a smal window. Your task 1. Modify the opening program descriptions (comments) so that i include a. The fle name- including full pathname. Ex: CATemplSnowman java b. The programmer's name (your name) c. The Due date d. The description of the purpose of this program 2. Change the color of snowman's head and ground to random colors 3. Change the class name to Snowman_firstinitialLastName and the correspondent file name Important: the code "Snowman" in item b is the class name. If you changed your class name to ndude your first initial and last name, you should change this line in the htmil file as wel Part l Use the Graphics, Color and Font objects to construct a picture with shapes of your design. You will be graded by the design, color, and documentation You design must include the followings 1. at least 3 different basic shapes 2 at least 2 different none-basic colors which indluding one that uses Random number to generate color components. Indicate which shape has random color in your opening program description. 3. your full name must shown in the output screen 4. the complexity of your design should be compatible to the attached sample fies 5. The program indentation must be correct 6. The filename need be include your firstinitialLastName in &. The file name should reflect to your drawing too You can draw your shapes in a regular JPanel or you can draw them in an applet. Use the sample programs attached- Fishtank java and Fishtank.htm for JApplet graphics and Tutle java for the stand along window graphics. In order to draw shapes in an applet, you need construct two files: a java program which draw the picture of your design and a htmil file which invokes the java dass of your design. The you need compile the java program and view the htmil fle using: alappletviewer ox htm A good design with effort is expected from each of you in order to get a full marks for this assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

3. Go over a sample question first.

Answered: 1 week ago