Programming Languages assignment IV
The purpose of this assignment is to translate the large_numbers package into C++, to gain familiarity with it, and to add handling of signs, to get some additional useful functionality in. This means the following new operations: a) Subtraction of two positive numbers, where it is known that the first is larger than the second and the result is positive. b) Comparison of two large positive numbers. It is sufficient to implement one comparison, say ">", and write all the others in terms of ">" and "=". c) Now addition of signed numbers checks the signs and calls either addition or subtraction depending on the relative signs (5 lines of code). d) For multiplication all that is required is to set the sign of the result properly. e) The output routine should include the sign. You can use any C++ compiler you have. Keep the code simple, don't use anything from the template library or from any other library, the point of the exercise is to understand the low-level aspects of the data structures. and the program organization. Program organization: if object-oriented programming is new to you, write a namespace with the types and the methods. If you've been using classes since elementary school, then define a class Large_Number, and make the operations public methods in the class. There will probably be a few private methods that are used at the implementation level. The data members are of course private.