The Baseball Hitter

1
The Batter Computer Science Flowcharting Exercise A baseball coach needs to teach their players the best practices to achieve a home run. We want to create a computer program to solve this need. The program needs to estimate the final distance and height reached by the ball, with the following restrictions: o Minimum batting angle: 0º. o Maximum batting angle: 90º. o Minimum output speed of the ball: 0 m/seg o Gravity: 9.8m/s2 o Home Run minimum distance: 120m. o Height of the barrier in line homerun. o Homerun barrier height: 2.5m. o Ignore: Air friction, temperature, ball weight, or any other condition. Competent: The flowchart needs to show how the program reads the values of speed and batting angle, to calculate the final distance reached by the ball. If the reached distance do not exceeds 120 meters, the program starts again, and if the ball fly over 120 meters, the programs notifies the home run. Advanced: In addition of competent: The flowchart needs to show how the program calculates the height of the ball at any time. If the ball reaches 120 meters (homerun distance), the program checks if the height is at least 2.5 meters to confirm the homerun. If not, the home run is not valid. Mastery: In addition of advanced: The flowchart needs to show how the program calculates the flying time of the ball at any distance, or at any initial speed or at any batting angle. Make your design in a piece of paper and following all the flowcharting standards learned in class. At the end of the activity please deliver your flowchart to the teacher. Use all the uploaded materials in the Schoology folder (Flowcharts). ¡PLAY BALL! Eng. Julian E. Pérez M. Computer Science Teacher

description

Algorithms

Transcript of The Baseball Hitter

  • The Batter Computer Science Flowcharting Exercise A baseball coach needs to teach their players the best practices to achieve a home run. We want to create a computer program to solve this need. The program needs to estimate the final distance and height reached by the ball, with the following restrictions:

    o Minimum batting angle: 0. o Maximum batting angle: 90. o Minimum output speed of the ball: 0 m/seg o Gravity: 9.8m/s2 o Home Run minimum distance: 120m. o Height of the barrier in line homerun. o Homerun barrier height: 2.5m. o Ignore: Air friction, temperature, ball weight, or any other

    condition. Competent: The flowchart needs to show how the program reads the values of speed and batting angle, to calculate the final distance reached by the ball. If the reached distance do not exceeds 120 meters, the program starts again, and if the ball fly over 120 meters, the programs notifies the home run. Advanced: In addition of competent: The flowchart needs to show how the program calculates the height of the ball at any time. If the ball reaches 120 meters (homerun distance), the program checks if the height is at least 2.5 meters to confirm the homerun. If not, the home run is not valid. Mastery: In addition of advanced: The flowchart needs to show how the program calculates the flying time of the ball at any distance, or at any initial speed or at any batting angle. Make your design in a piece of paper and following all the flowcharting standards learned in class. At the end of the activity please deliver your flowchart to the teacher. Use all the uploaded materials in the Schoology folder (Flowcharts).

    PLAY BALL!

    Eng. Julian E. Prez M. Computer Science Teacher