3
answers
0
watching
183
views
2 Mar 2018
19. (2 points) Given the Rocket class from program 6 which includes instance variables xVel and yvel, write a method called safeLanding () that could be added to the Rocket class and returns true if the rocket made a safe landing and false otherwise. Assume the rocket has landed and you are only deciding if it was a safe landing or not. A safe landing is one in which both the x and y velocities are between -0.4 and 0.4. class Rocket { float xVel, yvel; // most of the class is omitted and not needed for this question // put your safeLanding method here
19. (2 points) Given the Rocket class from program 6 which includes instance variables xVel and yvel, write a method called safeLanding () that could be added to the Rocket class and returns true if the rocket made a safe landing and false otherwise. Assume the rocket has landed and you are only deciding if it was a safe landing or not. A safe landing is one in which both the x and y velocities are between -0.4 and 0.4. class Rocket { float xVel, yvel; // most of the class is omitted and not needed for this question // put your safeLanding method here
3
answers
0
watching
183
views
For unlimited access to Homework Help, a Homework+ subscription is required.
22 Jun 2023
4 Dec 2021
Already have an account? Log in
Lelia LubowitzLv2
2 Mar 2018
Already have an account? Log in