Homework 7 Part I, It does add up.

Short Description:

Implement a simple big number system for integers.

This assignment is worth 50 points.

Goals

When you finish this homework, you should have:

Formal Description

Many programming problems involving calculations run into trouble when the basic integer representation on the system is not of sufficient size. In order to overcome such problems, programmers can implement a large integer class. This class would store the digits of a number in some type of data structure (like the list class). The class would also provide the operations necessary for normal programming.

Such operations would include normal mathematical operations on integers (+,-,*, comparison) as well as basic input, output and assignment. In this case, division and modulus are optional. You should also provide operations which convert your representation to other representations, such as strings and longs. Finally you should provide the ability to determine the number of digits in your integer, the sign of your integer, and if numeric overflow has occurred.

The class should be constructed in a manner such that it can be used in multiple programs (header and implementation files). As such, the header file should be documented following the examples on page 608 of your book. You should document your implementation file, as well as your drivers according to my standards.

You should implement two programs, the first should be a driver which tests all aspects of your class. The second should allow a user to interactively compute factorial for large numbers (60! = 8320987112741390144276341183223364380754172606361245952449277696409600000000000000).

Discussion

Required Files

A tar file containing only source code and a Makefile.

Submission

Email the tar file of your source code to danbennett360@gmail.com by class time of the due date.