Construct a hierarchy where `Vehicle` has `int speed`, `Car` inherits `Vehicle` and adds `int doors`, and `SportsCar` inherits `Car` and adds `int boost`. Use parameterized constructors to pass data up the chain (`Car(s, d) : Vehicle(s)`). Read 3 integers (speed, doors, boost), instantiate `SportsCar`, and print them each on a new line: “Speed: [s]”, “Doors: [d]”, “Boost: [b]”.
Three space-separated integers.
Print the properties of the sports car.
None
200 2 50
Speed: 200
Doors: 2
Boost: 50
Constructor initialization chains pass arguments up the inheritance hierarchy to initialize base class attributes.
#include <iostream>
class Vehicle {
public:
// Define speed and constructor
};
class Car {
public:
// Inherit Vehicle, define doors and constructor
};
class SportsCar {
public:
// Inherit Car, define boost and constructor
};
int main() {
// Read input, instantiate SportsCar, and print attributes
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used