Question: Given the code segment: class vehicle public: int year; private: float mileage; Write a member function setMileage () for the class vehicle to modify the

Given the code segment: class vehicle public: int year; private: float mileage; Write a member function setMileage () for the class vehicle to modify the value of mileage. The function takes 1 parameter float m. If mis greater than or equal to 0, copy its value to mileage. If mis less than 0, do nothing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
