Question
C++: THERE SHOULD BE main.cpp, Number.cpp and Number.h also first variable is a int and the second one is a pointer. This week's lecture, we
C++: THERE SHOULD BE main.cpp, Number.cpp and Number.h also first variable is a int and the second one is a pointer.
This week's lecture, we are dealing with a number class. Go ahead and implement it completely with its copy constructor, overloaded assignment operator and destructor. Later on, in main, write an application that creates 2 numbers, sums them up and assigns the result in a new number.
An example:
Number 1 (10,15) Number 2 (12,14) --------------------------+ Number 3 (22,29)
//So as you can see, We are summing both parameters of numbers and storing the total as a new Number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started