Question: In C + + ; Need Help with this weeks lab. I need to Implement a bare bones version of the BigNumber class with just
In C ; Need Help with this weeks lab. I need to Implement a "bare bones" version of the BigNumber class with just the following:
string constructor
stream insertion operator
stream extraction operator
cin b; same as operatorcin b;
istream & operatoristream & in BigNumber & b
read the user input really just a string
set b to the BigNumber object corresponding to user input
Use the string constructor
return in;
and operatorsoperator and operator
increment and decrement operatorsexample with decrement
for completeness provide both pre and post version
Special case: so update numDigits
operator that uses repeated increment and decrement.
That means b c b c Repeat in a loop until c is equal BigNumber
Example return
Upload BigNumber.h BigNumber.cpp and a simple driver to test the above member functions.
Driver will just look something like this...
#include
#include "BigNumber.h
int main
BigNumber b;
std::cout b std::endl;
b;
std::cout b std::endl;
more tests
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
