Answered You can hire a professional tutor to get the answer.

QUESTION

PLEASE EXPLAIN AS MUCH AS POSSIBLE 1) simple C++ program to instantiate an object that will store two numbers and perform mathematical operations...

PLEASE EXPLAIN AS MUCH AS POSSIBLE

1) simple C++ program to instantiate an object that will store two numbers and perform mathematical operations using those numbers as operands. The class should have a header called Adder.h and a .cpp file called Adder.cpp. Testing should be done in a separate .cpp file called main.cpp. The class should have at least two constructors. The default constructor should instantiate both operands to 2. A second constructor should accept two numbers as arguments and use the arguments to set the local operands. The class should have 6 functions: add(), subtract(), multiply(), divide(), get(), and set(). The first four functions should return the result of performing the stated operations using the two operands and take no arguments. Get() should take one argument to specify which operand to return. Set() should take two arguments, the first to specify which operand to set and the second to specify the number to set the operand equal to. Your code should document each function, and the class, with comments.

2-)singly linked list to store a list of integers. The class should have a default constructor to instantiate an empty list. The linked list should have the following functions at a minimum: insert(), remove(), empty(), get(), set(), search(), print(). These functions should perform in the manner we discussed in class. You should have a .h and a .cpp file for the linked list class and a main.cpp for testing. Your code should document each function, and the class, with comments.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question