Question: This is Java Programing Question f you od od 7. Implementation (50 points) Consider the Sphere class on the following three as The designers of
f you od od 7. Implementation (50 points) Consider the Sphere class on the following three as The designers of a geometry wpica with the job to implement the following changes. ce pages. The designers of a geometry application taked yo 1. Complete the getVolume and getArea() methods. is and the 2. Allow Sphere objects to be tested for als The basis for equality includes both the radius center point. DOM etarea() methods. 15 3. Write enough JUnit test to gain full coverage of the getVolume and getArea mea radius 1: - volume: 4.18879 surface area: 12.56637 radius 5: - volume: 523.59878 surface area: 314.15927 36/50 room. Notes: Implement part 1 inside of the provided method stubs on page 2. Feel free to use all of the available space on page 3 for part 2. Feel free to use all of the available space on page 1 of Sphere Test for part 3. Do NOT edit or alter any of the existing methods or fields. You may assume both of the following classes are in the same package. Description For reference, the following documents the public interface for the Sphere class: (This sphere is defined as the set of all points in three-dimensional Euclidian space that are located at a distance (radius) from a given point (center point) Method Sphere Sphere (radius, Constructor that takes a radius and a center point as arguments. centerPoint) The center point is a java.awt. Point and the radius is a center point ra B igDecimal. BigDecimal getRadius) Returns the radius of the Sphere Point get CenterPoint( Returns the center point of the Sphere Returns the volume of the Sphere with a radius (R) using the BigDecimal getVolume() following formula: Returns the surface area of the Sphere with a radius (R) us following formula: 4 R2 getArea() BigDecimal f you od od 7. Implementation (50 points) Consider the Sphere class on the following three as The designers of a geometry wpica with the job to implement the following changes. ce pages. The designers of a geometry application taked yo 1. Complete the getVolume and getArea() methods. is and the 2. Allow Sphere objects to be tested for als The basis for equality includes both the radius center point. DOM etarea() methods. 15 3. Write enough JUnit test to gain full coverage of the getVolume and getArea mea radius 1: - volume: 4.18879 surface area: 12.56637 radius 5: - volume: 523.59878 surface area: 314.15927 36/50 room. Notes: Implement part 1 inside of the provided method stubs on page 2. Feel free to use all of the available space on page 3 for part 2. Feel free to use all of the available space on page 1 of Sphere Test for part 3. Do NOT edit or alter any of the existing methods or fields. You may assume both of the following classes are in the same package. Description For reference, the following documents the public interface for the Sphere class: (This sphere is defined as the set of all points in three-dimensional Euclidian space that are located at a distance (radius) from a given point (center point) Method Sphere Sphere (radius, Constructor that takes a radius and a center point as arguments. centerPoint) The center point is a java.awt. Point and the radius is a center point ra B igDecimal. BigDecimal getRadius) Returns the radius of the Sphere Point get CenterPoint( Returns the center point of the Sphere Returns the volume of the Sphere with a radius (R) using the BigDecimal getVolume() following formula: Returns the surface area of the Sphere with a radius (R) us following formula: 4 R2 getArea() BigDecimal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
