Create class ‘Money’ for working with money sums - C++
27.04.2014, 20:33. Просмотров 137. Ответов 0
Create class ‘Money’ for working with money sums. Sum must be
represented by array, each element of it is decimal digit. Maximum array size is 100 digits, real
size is given by constructor. Low index corresponds to low digit of money sum. Two low digits
Create base class ‘Array’ with fields: array of ‘unsigned char’ and field for saving number of
elements of current object-array.
Maximal possible array size is given by a constant. Implement a constructor setting number
of elements and initial value (zero by default).
Implement a method of accessing to separate element by overloading of operation of
indexing . At this, checking of index for correctness must be implemented.
Implement in ‘Array’ class a virtual function of element-wise addition of arrays.