/**************************************************************** CS177 C++ Programming, Spring 1998 Lab 3. Putting functions inside classes This time I am giving you a partial program which is a C++ version of the last one. You task is to complete the program by writing the bodies for the three member functions of the class Numbers so that the program behaves just like the last one. i.e. it prints the result of dividing the two integers and the result of the remainder operation. The only changes are to split the tasks between the three functions 'input', 'quotient' and 'remainder' and to test for the second number being zero. This test avoids division by zero, which is impossible. You can refer to last week's program to accomplish this split. Follow these steps to complete the assignment. 1. Edit the source code frm this message exactly as in your first assignemnt. 2. Use the editor to add bodies for the member functions 'quotient' and 'remainder' to print out the corresponding result. Also make both of them test for the second integer being zero, and in that case, make the program print a message instead of doing the operation. 3. Compile and run the program several times to test its results. 4. Run the program twice more with the these inputs: First run: first integer: 23 second integer: 7 Second integer: first integer: 23 second integer: 0 Redirect the output to a file in each case, and insert the outputs into a copy of the source code file. 5. Print the file with the source code and output and hand it to me (RTH). 6. Mail the same file to our grader (login hhuang). Points to note: o You may get compilation errors and/or warnings. Pay attention to these messages because you program may not run correctly, or at all because of these errors. o Don't forget to put your name in the file comment. o the three functions are all 'void' functions--they do not return any value. o You may need extra variables to hold the results of the arithmetic operations. You should declare these at the top of the body of each function, NOT in the class. o Use the if-else form in the test for zero. The 'then' branch will be the arithmetic operation. The 'else' branch will be your error message. *******************************************************************/ ///////////////////////////////////////////////////////////////////// // CS177/457, Spring 1998 // // Using class member functions for separate tasks. // // Roger Hartley // ///////////////////////////////////////////////////////////////////// #include class Numbers { private: int integer1, integer2; public: void input() { /* put your code in here*/ } void quotient() { /* put your code in here */ } void remainder() { /* put your code in here */ } }; int main() { Numbers numberObject; numberObject.input(); numberObject.quotient(); numberObject.remainder(); return 0; }