Ok so I attatched the assignment the question I'm on is #2 and this is what I have down so far. It asks for a return type but I'm not sure what to return? Any advice would be greatly appreciated I've been working on this assignment for what seems like forever.

public class cannonball { private double velocity; private double time; final double GRAVFORCE = 9.81; private double height; private double heightFormula; private double maxHeight; public cannonball(double Velocity) { velocity = Velocity; height = 0; heightFormula = 0; } public double simulateFlight() { time = 0; while(height>0||time<100) { heightFormula = (velocity*time)-0.5*GRAVFORCE*Math.pow(time,2); height = velocity*time; time++; velocity = velocity - GRAVFORCE*time; str = time + "\t\t"+ velocity +"\t\t" + height + "\t\t"+ heightFormula; } } }