November 2019
Beginner
228 pages
2h 45m
English
Java provides a basic coding framework, such as for or while loops and if or switch conditional statements. We can make use of them to keep track of moving objects versus its times. First, we’ll work with a popular math problem - bouncing ball scenario.
In a pure math approach, we’d build a table to record the height after each bounce. It is not that hard, but if we change the height value in the original problem setting, we will have to recalculate the values in the same table by hand.
Example
A ball is dropped from a height of 3 meters. On its first bounce it rises to a height of 2 meters. ...
Read now
Unlock full access