Programming Project 3

This assignment is due Friday, April 9, by the start of class.

Objectives:

Assignment:

Part 1 (50 points): Implement class bigInt using lists. A bigInt is a class that permits a client program to manipulate integers that can be quite a bit larger than built-in ints. The header file for bigInts is attached to this assignment sheet.

Your implementation of bigInts must use the list class. Suggestions for implementing bigInts will be discussed in class.

Part 2 (50 points): Write a program that prompts the user for an integer (let's call it n), then calculates n! and fibb(n). Your program should use bigInts. If either n! or fibb(n) causes overflow, your program should print a message indicating overflow occurred, otherwise it should print the appropriate value. For example, the following is a sample run:

Please enter an int 45
The 45th fibonacci number is:
1134903170
45! is:
119622220865480194561963161495657715064383733760000000000

Please enter an int 100
The 100th fibonacci number is:
354224848179261915075
Overflow occurred when calculating n!

Please enter an int 600
Overflow occurred when calculating fibb(n)
Overflow occurred when calculating n!

Folder "Lab3 Template" in the public folder on the I: drive contains the header files and list for this assignment; you should start this assignment by copying this folder to your I: drive folder.