[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/M2vQ7dnE) ## IF.03.22 POSE - Procedural Programming # Assignment: Car - Abstract Data Type [Deutsche Version](./README_de.md) An abstract data type __Car__ should be implemented, which realizes basic functionalities of a car. ## Example The code sequence to retrieve a car from a parking spot and accelerate it to 100 km/h would look as follows: ```c Car c = get_car(JEEP); if (get_color(c) == BLACK) { set_acceleration_rate(c, 3); while (get_speed(c) < 100) accelerate(c); } else { printf("I only drive black cars!"); } ``` ## Tasks + Define two enums, `CarType` and `Color`. + Create a forward declaration for the Car type so that the prototypes in the header file can be accepted by the compiler. + Create minimal stub implementations for all required functions. This should allow the overall project to build successfully. + Define the struct from the forward declaration. + Create local (file-specific in car.cpp only) variables for all required cars. + Create a local array `car_park` to store all cars. + Write a program in the file car_main_driver.c that races all cars defined in `car.cpp` against each other. + Level 1: Retrieve all cars from `car.cpp` and display them sequentially in the terminal. Represent the cars by their initial letter and a running number. + Level 2: Now let the cars "race" by setting each car's acceleration randomly in each round and, based on the resulting speed, move each car accordingly to the right. The race should stop as soon as one car reaches the finish line (the right edge of the screen). >Note: Speed is given in km/h, while acceleration is given in m/s.