MasteringWeb3.0 recruitment task The task code was very interesting . Here’s how my code works! I made a car class and defined the required attributes. But I made the speed attribute another class with its 3 co-ordinate components. Now I took user input the co-ordinates and the speed with it’s 3 co-ordinates for the two cars separately. Then I asked the user what car’s acceleration/braking do they want to modify, and accordingly invoked the acceleration/braking function. the acceleration/braking function updates all the three co-ordinates of the speed function. I calculated the time taken for them to collide, and then invoked the move function. the move function updates all the three co-ordinates of the car, and the time is calculated by distance/absolute value of relative speed. I created structure speed to contain x y z components of speed. Due to time constraint we were not able to convert C file to Cpp correctly so we have uploaded both files.code of C file is running better.
-
Notifications
You must be signed in to change notification settings - Fork 0
Pr030304/MasteringWeb3.0
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
MasteringWeb3.0 recruitment task
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published