Question: Step 3 File IO please do main.cpp Big decimal.cpp and the rest Make a change to your BigDecimal class to add the following functions (

Step 3 File IO please do main.cpp Big decimal.cpp and the rest
Make a change to your BigDecimal class to add the following functions (methods)
int wholeNumber()- Returns only the whole number portion of the decimal
number as an int
double fraction()- Returns the fractional portion of the number as double
File IO
Attached at this link is a text file called Numbers.txt that contains several numbers.
You are to read in each of these numbers and store them in your BigDecimal class.
Basically you are going to need a BigDecimal class for each number that is in the file.
Store each BigDecimal in some kind of container like a vector or an ArrayList.
Once you have all of the numbers loaded use a loop to write out all of the numbers
into two separate text files. One file called wholeNumbers.txt will hold the whole
number portion of the number. The other file call fraction.txt will hold the fractional
portion of the number. Make sure you include the decimal point.
Open each of the files in Notepad and make sure that you have one number per line.
 Step 3 File IO please do main.cpp Big decimal.cpp and the

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