โ Back to Inheritance
Question 536
Kilometers To Meters
Kilometers To Meters
Metersstores a value. Complete theKilometersconstructor so it passeskm * 1000to the base constructor (1 kilometer is 1000 meters). The tester prints the storedValue. Do NOT write aMainmethod. Fornew 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.