Basketball - } /** * Get the status of this basketball's...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package lab02; p /** * A model of a basketball used in quality control simulations. */ public class Basketball { p /** * Inflation state of this basketball. */ private boolean isInflated; /** * Circumference of this basketball in inches. */ private double circumference; /** * Construct a basketball with the given circumference in inches. * * @param givenCircumference * The circumference of the basketball. */ public Basketball(double givenCircumference) { isInflated = false; circumference = givenCircumference;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } /** * Get the status of this basketball's dribbleability. * * @return * True if the basketball can be dribbled, false otherwise. */ public boolean isDribbleable() { return isInflated; } /** * Get the circumference of this basketball. * * @return * Circumference of basketball. */ public double getCircumference() { return circumference; } /** * Inflate the basketball. */ public void inflate() { isInflated = true; } }...
View Full Document

Ask a homework question - tutors are online