This is a simple C++ Program to demonstrate Inheritance. Simpler methods in the classes have been changed to inline code to shorten the file considerably.

Logitech M510 Wireless Computer Mouse
Boost productivity with the Logitech MX Master 3 – the ultimate wireless mouse with ergonomic design, seamless control, and customizable features!
View on Amazon

In a practical programming situation, methods that are this short should be programmed inline since the actual code to return a simple value is shorter than the code required to send a message to a non-inline method.

Output of the C++ program