Question: Please give in sudo code. Thanks! Write a class to represent an odometer (a mileage counter in a car). Assume the mileage counter 'rolls over'

Please give in sudo code. Thanks!
Write a class to represent an odometer (a mileage counter in a car). Assume the mileage counter 'rolls over' at 100,000 miles, 99,999+1=0. Keep the distance traveled as in integer, and declare any needed fields. Treat these short descriptions as contracts: - Write a constructor that takes no parameters, and sets the distance traveled to 0 . - Write a method that returns the distance traveled. - Write a method that increases the distance traveled by an amount (specified in a parameter). Do not write any other methods. General notes on writing classes: Use the standard naming convention for accessors and mutators, and choose appropriate visibilities throughout. Use 'this' only where needed. Choose appropriate names. Do not write contracts or comments. Solutions will be marked on correctness, ease of reading (can we find things), and simplicity. Overlycomplex code (code that takes unnecessary steps), computations that are excessively long, or unnecessary parameters, return values, method calls, input, or output will be marked down
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
