Page 1 of 1

Write a method that returns the speed of a car. The method takes as parameters the distance and time of a car. The metho

Posted: Thu Jul 14, 2022 2:17 pm
by answerhappygod
Write a method that returns the speed of a car.The method takes as parameters the distance and time of acar.The method returns the velocity of a car.velocity = distance * timeHere is what the header should look like:
Call the above method in a loop to show the table below.The distance starts at 0 meters and increases by 1 for each row,until it reaches 4.The time starts at 0 meters and increases by 3 every row.
Hint:
The number 48.00 shifts-right if you useSystem.out.println().We'll fix that in the next assignment by usingSystem.out.printf().
Please give answer in the code for java and if possible ascreenshot of your output