Question: data structure C++ Part2,3 Create a class named Bigfoot which stores the height, weight, shoe size, and hair color. To set the attributes of a
data structure C++ Part2,3
Create a class named Bigfoot which stores the height, weight, shoe size, and hair color.
To set the attributes of a Bigfoot object, you must use the overloaded operators for input. To print information about the Bigfoot, you must use the overloaded output operator.
You must also overload a greater than or equal to operator for Bigfoot, and then create two Bigfoot to compare them against each other.
Your driver file may look like:
int main() { Bigfoot b1, b2; cout << "Enter information about the first bigfoot: "; cin >> b1; cout << "Enter information about the second bigfoot: "; cin >> b2; cout << b1 << endl; cout << b2 << endl; if(b1 >= b2) cout << "The first Bigfoot is greater "; else cout << "The second Bigfoot is greater "; return EXIT_SUCCESS; } Part 3
Take your Bigfoot class, and define in your own custom namespace. This can be called whatever you wish.
Then, back in the driver file, remove the using namespace std; line. Add the proper scope resolution prefix to the code that needs it in order for your code to run, as it did in Part 2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
