CJCoding With Joseph

Kilometers To Meters

Meters stores a value. Complete the Kilometers constructor so it passes km * 1000 to the base constructor (1 kilometer is 1000 meters). The tester prints the stored Value. Do NOT write a Main method.

For new Kilometers(2) the program prints:

2000

Expected Output:

2000
Topics:
Inheritance
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.