In another Bruce Eckels exercise in calculating velocity, v = s / t where s and t are integers. How do I make it so the division cranks out a float?
v = s / t
Try this:
class CalcV { float v; float calcV(int s, int t) { float value1=s; float value2=t; v = value1 / value2; return v; } //end calcV }