Question: Please help me code the following! Please read carefully. Full points will be awarded, thanks in advance Queue and LongInt Problenm Consider the LongInt class

Please help me code the following! Please read carefully.

Full points will be awarded, thanks in advance

Please help me code the following! Please read carefully. Full points willbe awarded, thanks in advance Queue and LongInt Problenm Consider the LongIntclass we have implemented in programming assignment 7. Code a new public

Queue and LongInt Problenm Consider the LongInt class we have implemented in programming assignment 7. Code a new public function named shiftleft( ) that shifts its long integer left by just one bit (but not by a digit). Assume that all public and private functions listed in the following header file (of course, except shiftleft )) have been already implemented. However, you must not use operatort and operator- to implement the shiftleft ) function. (Otherwise, this question is too easy.) Hint: "shift left by 1 bit means multiply by 2". The deque.h file #ifndef DEQUE H #define DEQUE H #include using namespace std; template class Deque public: // the constructor /7 the copy constructor // the destructor /7 checks if a deque is empty. // retrieves # deque nodes // retrieve the front node // retrieve the tail node /7 clean up all deque entries //add a new node to the front /add a new node to the tail // remove the front node // remove the tail node Deque): Deque (const Deque &rhs); Deque bool isEmpty) const: nt size const: const Object &getFront ( const; const Object &getBack const: void clear void addFront( const Object &obj void addBack( const object &obj Object removeFront): Object removeBack) const Deque &operator-( const Deque &rhs; 1/ assignment private: // a deque node struct DequeNode Object item; DequeNode *next; DequeNode prev; DequeNode *front: DequeNode *back; #include #endif "deque.cpp" The longint,h file #Ifndef LONG!NT H #define LONG!NT H #include include "deque . h" using namespace std; class LongInt friend istream &operator>>( istream &in, LongInt &rhs ; friend ostream &operator const LongInt & rhs ) const: bool operator>=( const LongInt & rhs ) const; bool operatorconst LongInt & rhs const: bool operator! const LongInt & rhs const: // a new function const LongInt &shiftleft private: Deque digits ; bool negative: void removeos 0: #endif Queue and LongInt Problenm Consider the LongInt class we have implemented in programming assignment 7. Code a new public function named shiftleft( ) that shifts its long integer left by just one bit (but not by a digit). Assume that all public and private functions listed in the following header file (of course, except shiftleft )) have been already implemented. However, you must not use operatort and operator- to implement the shiftleft ) function. (Otherwise, this question is too easy.) Hint: "shift left by 1 bit means multiply by 2". The deque.h file #ifndef DEQUE H #define DEQUE H #include using namespace std; template class Deque public: // the constructor /7 the copy constructor // the destructor /7 checks if a deque is empty. // retrieves # deque nodes // retrieve the front node // retrieve the tail node /7 clean up all deque entries //add a new node to the front /add a new node to the tail // remove the front node // remove the tail node Deque): Deque (const Deque &rhs); Deque bool isEmpty) const: nt size const: const Object &getFront ( const; const Object &getBack const: void clear void addFront( const Object &obj void addBack( const object &obj Object removeFront): Object removeBack) const Deque &operator-( const Deque &rhs; 1/ assignment private: // a deque node struct DequeNode Object item; DequeNode *next; DequeNode prev; DequeNode *front: DequeNode *back; #include #endif "deque.cpp" The longint,h file #Ifndef LONG!NT H #define LONG!NT H #include include "deque . h" using namespace std; class LongInt friend istream &operator>>( istream &in, LongInt &rhs ; friend ostream &operator const LongInt & rhs ) const: bool operator>=( const LongInt & rhs ) const; bool operatorconst LongInt & rhs const: bool operator! const LongInt & rhs const: // a new function const LongInt &shiftleft private: Deque digits ; bool negative: void removeos 0: #endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!