Write a program for car drive.
Following condition should meet in the program.
1. Accelerator should be main thread.
2. car can drive with maximum speed of 5000 KM on top gear.
below are each speed levels for each gear.
a. 0-1000 KM 1st gear
b. 1000-2000 2nd gear
c. 2000-3000 3rd gear
d. 3000-4000 4th gear
e. 4000-5000 5th gear
f. Revers 6th gear
3. Three speed breaks at each speed levels 4100,4200,4300 respectively after 5th Gear shifted, so here break should be applied to reduce the speed and gear should be shifted to 1st gear.
4. In 4th Level car should reach maximum speed then apply break to park the car using reverse gear.
5. Each gear shift clutch should be used as required.
6. Total speed driven should be calculated and shown.
5. 9 threads should be used.
6. logger or sysout should be used to show each threads activity in console.
What I have tried:
Has anyone please help me out with the below code please?