Answered step by step
Verified Expert Solution
Question
1 Approved Answer
getWeight - Value - returning function to return the weight getHeight - Value - returning function to return the height Default constructor - Sets name
getWeightValuereturning function to return the weight
getHeightValuereturning function to return the height
Default constructor Sets name to the empty string and age, weight, and height to
Constructor with parameter Sets the values of the instance variables to the values specified by the user
Write the definition of these member functions of the class secretType
b Write the main class that creates at least two different instances of the secretType class. Please play around with the member functions for this task, eg the first instance can be created from the constructor with parameter and the second instance can have its information from the functions setName, setAge, setweight, setHeight Then print out the information ie member variables of these instances.
Part B: points. Lab PartB.cpp graded out of points if not submitted during lab time.
Check to see what value the function mystery returns when called with a value of int mysteryint number
else
return number mysterynumber :
Write the similar function mystery but using the while or 'for' loop instead.
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