Special offer for new customers: 5% OFF your first order! Use coupon: GWRITERSclose

Programing Project

Due to the three parts to this assignment, if accepted, I’ll release the first half of payment when part 1 of this assignment is finished.

The project has three parts.  All three classes are to be worked within the starter code provided for you.

The starter code that is mandatory for this has been included in the attachments, thank you for your time.
________________________________________________________________________________________

Part I:

Work in class Circle.

Design a class named Circle with double fields named radius and circumference and area.  Include a no argument constructor that set the radius to 1 and calculates the other two values.  Include a second constructor that accepts a value for the radius.

public Circle()

public Circle(double radius)

Calculations:

The circumference is 2*pi*r.

The area is pi*r^2.

Use Math.PI for this calculation.

Include methods getRadius() and setRadius().  Also include a method getArea() and getCircumference().

The main method to enter data and display the data is provided for you.  You are to finish the Circle class in the Circle.java file.

________________________________________________________________________________________

Part II:

Work in class CheckArray.

Using a method

has4or5(int [] arr)

that reads in an integer array, return whether or not the array contains a 4 or 5.

If a 4 or 5 is found in the array, return true.  If no 4 or 5 can be found in the array, return false.

________________________________________________________________________________________

Part III:

Work in class ArraySize.

Start with 2 int arrays, a and b, each length 4. Consider the sum of the values in each array. Return the array which has the largest sum. In event of a tie, return a.

You can leave a response, or trackback from your own site.
Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes