operations |
comment | "parent_author":"",<br>"parent_permlink":"programming",<br>"author":"kakradetome",<br>"permlink":"4-2-distance-travelled-java",<br>"title":"4.2. Distance Travelled - Java",<br>"body":"<html>\n<p>https:\/\/www.youtube.com\/watch?v=4lTONBkv3J4<\/p>\n<p>Starting out with Java: From control structures through objects<\/p>\n<p>Chapter 4<\/p>\n<p>Programming Challenges<\/p>\n<p>2. Distance Traveled <\/p>\n<p>The distance a vehicle travels can be calculated as follows: <\/p>\n<p>Distance = Speed * Time <\/p>\n<p>For example,<br> if a train travels 40 miles-per-hour for three hours,<br> the distance traveled is 120 miles. Write a program that asks<\/p>\n<p>for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. For example,<br> if a vehicle is traveling at 40 mph for a three-hour time period,<br> it should display a report similar to the one that follows: <\/p>\n<p>Hour Distance Traveled <\/p>\n<p>---- ------------ <\/p>\n<p> 1 40 <\/p>\n<p> 2 80 <\/p>\n<p> 3 120<\/p>\n<p>Input Validation: Do not accept a negative number for speed and do not accept any value less than 1 for time traveled.<\/p>\n<p>Gaddis,<br> Tony (2015-05-29). Starting Out with Java: From Control Structures through Objects (Page 263). Pearson Education. <\/p>\n<p>Kindle Edition.<\/p>\n<p>Happy Steeming Everyone! :)<\/p>\n<\/html>",<br>"json_metadata":" \"tags\":[\"programming\",<br>\"coding\",<br>\"java\",<br>\"gaddis\",<br>\"distance-travelled\" ,<br>\"image\":[\"https:\/\/img.youtube.com\/vi\/4lTONBkv3J4\/0.jpg\" ,<br>\"links\":[\"https:\/\/www.youtube.com\/watch?v=4lTONBkv3J4\" " | vote | "voter":"kakradetome", "author":"kakradetome", "permlink":"4-2-distance-travelled-java", "weight":10000 |
|