(Create a java )Consider a ball is kicked at an angle e (in degrees) from the horizontal with an initial velocity vo m/s. Write a java program that ask the user for values of e and vo m/s (meter per second) and accordingly it simulates the ball movements in very short time intervals At millisecond (ms). You will take the time interval for measurements at a standard interval of At = 10 ms and determine the football position Ax and Ay (i.e. x and y coordinate). For the next iteration the new Ax and Ay will be used to update the distance. Run the simulation until the football falls back to earth. Your program computes and displays the position (x and y coordinates) and the velocity (vỵ and v,) of the football to record its dynamic-motion until it hits the ground. Calculate x and y every 10 ms but print the values every 500 ms with the format as shown in sample runs figures below.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

(Create a java )Consider a ball is kicked at an angle e (in degrees) from the horizontal with an initial velocity vo m/s. Write a java program that ask the user for values of e and vo m/s (meter per second) and accordingly it simulates the ball movements in very short time intervals At millisecond (ms). You will take the time interval for measurements at a standard interval of At = 10 ms and determine the football position Ax and Ay (i.e. x and y coordinate). For the next iteration the new Ax and Ay will be used to update the distance. Run the simulation until the football falls back to earth. Your program computes and displays the position (x and y coordinates) and the velocity (vỵ and v,) of the football to record its dynamic-motion until it hits the ground. Calculate x and y every 10 ms but print the values every 500 ms with the format as shown in sample runs figures below. 

Sample run 2:
Enter angle Theta between 0 and 90 degrees: 55.6
Enter positive velocity value : 21.4
Result :
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Time (s)
х (m)
vx (m/s)
y (m) vy (m/s)
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
0.000
0.00
12.09
0.00
17.66
0.500
6.05
12.09
7.60
12.75
1.000
12.09
12.09
12.75
7.85
1.500
18.14
12.09
15.45
2.94
2.000
24.18
12.09
15.69
-1.96
2.500
30.23
12.09
13.49
-6.87
3.000
36.27
12.09
8.83
-11.77
3.500
42.32
12.09
1.71
-16.68
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Max height: 15.89 (m) at time: 1.800 (s)
BUILD SUCCESSFUL (total time: 8 seconds)
Sample run 3:
Enter angle Theta between 0 and 90 degrees: -52
Enter angle Theta between 0 and 90 degrees: -10
Enter angle Theta between o and 90 degrees: 90
Enter positive velocity value : -40
Enter positive velocity value
: 20
Result :
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
vx (m/s)
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Time (s)
x (m)
y (m) vy (m/s)
0.000
0.00
0.00
0.00
20.00
0.500
0.00
0.00
8.77
15.09
1.000
0.00
0.00
15.10
10.19
1.500
0.00
0.00
18.96
5.28
2.000
0.00
0.00
0.00
20.38
0.38
2.500
0.00
19.34
-4.52
3.000
0.00
0.00
15.86
-9.43
3.500
0.00
0.00
9.91
-14.33
4.000
0.00
0.00
1.52
-19.24
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Max height: 20.39 (m) at time: 2.040 (s)
BUILD SUCCESSFUL (total time: 27 seconds)
Transcribed Image Text:Sample run 2: Enter angle Theta between 0 and 90 degrees: 55.6 Enter positive velocity value : 21.4 Result : -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Time (s) х (m) vx (m/s) y (m) vy (m/s) -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 0.000 0.00 12.09 0.00 17.66 0.500 6.05 12.09 7.60 12.75 1.000 12.09 12.09 12.75 7.85 1.500 18.14 12.09 15.45 2.94 2.000 24.18 12.09 15.69 -1.96 2.500 30.23 12.09 13.49 -6.87 3.000 36.27 12.09 8.83 -11.77 3.500 42.32 12.09 1.71 -16.68 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Max height: 15.89 (m) at time: 1.800 (s) BUILD SUCCESSFUL (total time: 8 seconds) Sample run 3: Enter angle Theta between 0 and 90 degrees: -52 Enter angle Theta between 0 and 90 degrees: -10 Enter angle Theta between o and 90 degrees: 90 Enter positive velocity value : -40 Enter positive velocity value : 20 Result : -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- vx (m/s) -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Time (s) x (m) y (m) vy (m/s) 0.000 0.00 0.00 0.00 20.00 0.500 0.00 0.00 8.77 15.09 1.000 0.00 0.00 15.10 10.19 1.500 0.00 0.00 18.96 5.28 2.000 0.00 0.00 0.00 20.38 0.38 2.500 0.00 19.34 -4.52 3.000 0.00 0.00 15.86 -9.43 3.500 0.00 0.00 9.91 -14.33 4.000 0.00 0.00 1.52 -19.24 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Max height: 20.39 (m) at time: 2.040 (s) BUILD SUCCESSFUL (total time: 27 seconds)
Horizontal
Vertical
Ax = voxt
1
Ay = voyt -5gt2
Vx = Vox
%3D
Vy = Voy – gt
Max Height
Transcribed Image Text:Horizontal Vertical Ax = voxt 1 Ay = voyt -5gt2 Vx = Vox %3D Vy = Voy – gt Max Height
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education