Homework 2 Csc211.

Due Tuesday Jan 27, 11:59pm


Problem 1 (25 Points)
Do all the problems in written exercise 1. You can find those exercises here

Turn in Instructions


Problem 2 (25 Points)

Due lab2 question 3. Your class must be named SphereInfoExcept your answer must be displayed to two decimal places. Use class DecimalFormat

Your output should look like this: For example if I enter 5 into the dialog box, your program should display to the screen.

 A sphere with radius 5.0 has a volume of 523.33
 A sphere with radius 5.0 has a surface area of 314.00
 
If I enter 3.4, your program should display to the screen.
 A sphere with radius 3.4 has a volume of 164.55
 A sphere with radius 3.4 has a surface area of 145.19
 

Note: Each program file should start out with comments, listing your name, date and a description of what the program will do.

Turn in Instructions


Problem 3 (25 Points)

Write a program to compute the volume of a cylinder.You must name your class CylinderVolume Your program must input two values. One for the radius, the other for the height. You can find the formula here Cylinder Formula Your program must output the volume rounded to two places. Use either System.out or JOptionPane to display the output.

Turn in Instructions