/******************************************************************** CS177/477 C++ Programming Fall 1999 An abstract data type for large integers Your task is to write a class for very large integers, i.e. ones that do not have a size limitation, and can be any number of digits long. Your program will consist of a single class, and a main function that tests its capabilities. The assignment will be split into two parts. This is part 1, in which your program will create large integers, read them from the keyboard and display them on the screen. Your program must: 1. be capable of representing integers of any length 2. have constructors to initialize numbers with standard integers (type long int), and from a string of digits (e.g. "1234567890") 3. be capable of reading and displaying objects of the type You can use this skeleton for the class itself and for the global functions: class Bignum { private: // insert here your representation of a very large integer using a vector public: Bignum(); // default constructor Bignum(long n); // constructor for "small" integers Bignum(string n); // constructor for very large integers protected: // insert here any accessor functions you may require void Extract(istream& sin); // the method for input void Insert(ostream& sout); // the method for output }; // define overloaded operators with global functions ostream& operator<<(ostream& str, const Bignum& b) { ... } istream& operator>>(istream& sin, Bignum& b) { ... } Hints and notes o Use a vector of unsigned char to hold the digits of the number--use push_back to add digits--store them in reverse order, e.g. the number 12345 is stored as digits 5, 4, 3, 2, 1 o Use #include's for and to use these facilities o Use const reference parameters in the implementations of the operators to avoid copying of the vector inside each object o Return a reference to the stream at the end of the insertion (<<) operator and the extraction (>>) operator o Use for loops, either forward or backward to process elements of the vectors o Implement member functions to do the work of the operations, and then global overloaded operators that call them. You will also need accessor functions for the private variable(s) in the class. Testing Your program should be able to succesfully compile and execute the following main function (assuming the name of the class is Bignum): ////////////////////////////////////////////////////////////////////// int main() { Bignum t1, t2(1234567890), t3("11223344556677889900"); // three different // constructors cout << "t1 is " << t1 << endl; // print the initial values cout << "t2 is " << t2 << endl; cout << "t3 is " << t3 << endl; Bignum t0; // for input cin >> t0; cout << "t0 is " << t0 << endl; return 0; } /////////////////////////////////////////////////////////////////////// Include this main function in your file and compile it with your class declaration and its methods. /////////////////////////////////////////////////////////////////////// DUE DATE: MONDAY NOVEMBER 1st. IN CLASS. //////////////////////////////////////////////////////////////////////