Starting from:

$25

VE 280 - Lab 9 - Solved



The range of in t is -2173648 ~ 2183647; the range of long in t is -2173648~ 2183647 on 32-bit platforms and is -923647508 ~ 923645807 on 4-6 and is -9223372036854775808 922337203' bit platforms; the range of long long in t is -923647508~ 923645807. What if we want to store an integer with value ?01 
We could create an ADT to represent large numbers! The number is represented by a linked list and each element stored in the linked list is an integer in the range 0~ 99. Ex. 1Templated Singly-Linked List  Related topics: template, linked list, deep copy 
To get you familiar with templates, the singly-linked list you are going to implement is a templated linked list, which is given in myl ist. h and shown below: 
/ / a n exception class class EmptyList{}; 
template <class T> struct N o d e_ t { Node_t* next; T val; 
} ; 
/ / singly-linked list template <class T> class List{ private: 
Node_t<T>* first; Node_t<T>* last; 
void r e m o v e A l l ( ) ; / / EFFECTS: called b y destructor/operator= t o remove and destroy / / all list elements 
void copyFrom(const List & l ) ; / / MODIFIES: this / / EFFECTS: called b y copy constructor/operator= t o copy elements / / from a source list l t o this list; / / i f this list i s not empty originally, / / removes all elements from i t before copying 
public: bool i s E m p t y ( ) const; / / EFFECTS: returns true i f list i s empty, false otherwise 
void insertBack(T v a l ) ; / / MODIFIES: this 

More products