CSC 122 : Computer Science II

Programming Assignment #6

 

Due Thursday, December 4, in class

 

 

Set-Up:

You are working for a major software company in Bluemond, Washington, called MiniSoft.  This company is working with a famous mathematician and physicist named Dr. Stephen Falconing in England.  Dr. Falconing is doing some work that requires very large numbers – numbers that are beyond the capabilities of C++ to directly represent.

 

Your project manager comes to you in a panic.  The other person who was supposed to be working with you on this project was caught selling office supplies on eBay from his office.  It turns out that he was hired away by MiniSoft’s arch-rival, Banana Computers.  The manager needs you to finish the rest of the class, and soon!  You should continue working in the folder where you did your initial work.  Remember, the class is defined according to Dr. Falconing’s strict specifications, so it is essential that you do not change anything in the class definition.  The one exception is the realization that Dr. Falconing needs another way to initialize the bigint, so he needs you to add another set function that takes a string as a parameter, and reads the string as a number and puts the value into the bigint.

 

 

Details:

 

For this assignment, you must write the implementations for the following bigint member functions:

·        The plusplus function.

·        The two versions of the add function.

·        The multiply function.

·        A new version of the set function taking a string as a parameter (this will need to be added to the .h file as well).

 

You should work individually for this assignment.  You must turn in hard copy versions of the bigint.h and bigint.cpp files in class on the due date.  You do not need to turn in copies of your testing programs.