Transaction: 8130503a484c56a6e12b394729699ff7d8e960ad

Included in block 5,857,155 at 2016/10/15 15:34:00 (UTC).

Transaction overview

Loading...
Transaction info
transaction_id 8130503a484c56a6e12b394729699ff7d8e960ad
ref_block_num 24,398
block_num5,857,155
ref_block_prefix 2,811,800,667
expiration2016/10/15T15:34:09
transaction_num 1
extensions[]
signatures 2042642d26e6ce8b2541395bf6ef2c7685a9856de2b9add6a3b1b5247b0ac5595438030e9965f19a8504b2448ac7242d71f4dd9600d9cd704443f8edb60ee5a259
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&nbsp;<\/p>\n<p>The distance a vehicle travels can be calculated as follows:&nbsp;<\/p>\n<p>Distance = Speed * Time&nbsp;<\/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:&nbsp;<\/p>\n<p>Hour &nbsp;&nbsp;&nbsp;&nbsp;Distance Traveled &nbsp;<\/p>\n<p>---- &nbsp;&nbsp;&nbsp;&nbsp;------------&nbsp;<\/p>\n<p>&nbsp;1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;40&nbsp;<\/p>\n<p>&nbsp;2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80&nbsp;<\/p>\n<p>&nbsp;3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.&nbsp;<\/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
* The API used to generate this page is provided by @steemchiller.