Task 4 - The Lucky Racer Game
Last Updated: Oct. 3, 2021 This task covers multiple topics we have studied so far. I request to not only focus on completing the functional requirements but think well about where a specific code or functionality should be implemented and implemented it there. Also think over what fields should be allowed to be read by other objects and which ones should be kept private. Create AutomaticCar class that shall contain private model, year, speed and gear attributes. Encapsulate complete state and expose the state for read/write (where it makes sense or required). As its an automatic car, so other shall not be able to update the gear attribute directly. The gear shall change automatically based on speed and other parameters (defined below). The speed range for different gears is as follows: (fromat: gear : speed-range) 0:0 1:1-100 2:101-200 3:201-300 4:301-400 5:401-500 The speed should not change when negative value is passed as argument to set method, in such cases, it should