Question: PLEASE USE C++ Specifications: In this assignment, you will create a class called platypus. Below, we will describe what will define a platypus. You will
PLEASE USE C++


Specifications: In this assignment, you will create a class called platypus. Below, we will describe what will define a platypus. You will also create a main function in which you will create objects of type platypus to test the functionality of your new user-defined type. Incidentally, this kind of main is called a driver, since it is used solely to test something (new) In that driver, you will create enough objects of your new type(s) in order to adequately test their functions. We leave it up to you to do this properly. Your platypus class is to contain the following: Member variables: o o o o o o a float for weight a short for age (months) a char for name initial a char for gender a bool to indicate whether alive (or not) a bool to indicate whether mutant (or not) Member functions: a default constructor that creates a dead platypus a constructor that you can pass values to so as to establish its gender, weight, age, and name; it will default to alive and not mutant aprint function that will output to the screen the attributes of that platypus ina nice, easy to read format an age_me function that returns nothing but increments the object's age. It will also include a 2% chance that the object will become a mutant. Further, the platypus has a chance of becoming dead each time it ages. This chance is ten times the platypus' weight. A 5 pound platypus has a 50% chance of death. A 10 pound platypus (or heavier) has a 100% chance of death. o o o o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
