Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ to ccoue only) Define a class called Bicycle that has two private data members (the wheel size and number of gears, both are int)
c++
to ccoue only) Define a class called Bicycle that has two private data members (the wheel size and number of gears, both are int) and two member functions (a constructor and a print function). You need to define your own constructor with the function prototype Bicycle(int, int); In the function body of the constructor, you need to verify whether the value of the wheel size is between 15 to 35, the number of the gears is between 5 to 20. Otherwise, set the wheel size to 20 and the number of gears to 12. In your print() function, output the data as follows: Bicycle Information: Wheel size: XX Number of gears: XX where XXs are some integers. In your main program, define an object with some data and call the function print()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started