Question: please answer fully with work Task 1: Write a C++ class, AllKinds, that has three member variables of type int, long, and float. The class
Task 1: Write a C++ class, AllKinds, that has three member variables of type int, long, and float. The class must have a default constructor that initializes every variable to 1, have another constructor that takes in each variable type to initialize (three arguments), and have "getters" and "setters" for ecch type. (Example: getInt (), setInt() ) Have public functions long intplusiong (); float intPlusfloat(); float longMinusfloat(); that take the sum or difference of the internal variables as implied by function name. Write a simple main () function to declare two instances of this class, one using the default constructor and one using the initialization constructor. For the class constructed with the default constructor, set each internal member variable of that class to a new number. Then call each arithmetic operator on both classes and print out the result. Select test values to demonstrate that your class is fully operational. Your completed assignment should consist of the following: 1) This cover sheet with Honor Code signed 2) Source code printout (put your na ne in the comments section and type the honor code) 3) A transcript from running your program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
