Question: Write a Longlnt class that stores numbers as an array of single digits (i.e. , each entry in the array is a number between 0

Write a Longlnt class that stores numbers as an array of single digits (i.e. , each entry in the array is a number between 0 and 9) . Your class should support numbers up to 100 digits. Using operator overloading have your class support addition, subtraction, and multiplication. Write a set method that allows you to pass a string of digits and sets the number based on the string. Each char element in the string can be treated as a number between 0 and 127; subtracting 48, which is the ASCII value for 0, will allow you to convert the char to a number between 0 and 9. Also, provide a method for outputting the number. Write a program that tests your Longlnt class.

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 Programming Questions!