Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions

Question

4. What is a project? What are its charactertics?

Answered: 1 week ago