โ Back to Inheritance
Question 535
Laptop Inherits Brand
Laptop Inherits Brand
Devicehas an auto-propertyBrand. MakeLaptopinherit fromDeviceso it has aBrandtoo. The tester setsBrandand prints it. Do NOT write aMainmethod. WhenBrandis set toAcer, the program prints: Acer
Expected Output:
Acer
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.