Question: Your BigDecimal class should have the following constructors BigDecimal ( ) - default constructor should simply set your container to three Char objects that contain
Your BigDecimal class should have the following constructors
BigDecimal default constructor should simply set your container to three Char objects that contain the values
BigDecimalString value This constructor will parse the string taking each digit, putting it into a new Char and adding the Char to the container.
Your BigDecimal class should also contain the following mutators
void setValuechar ch A char that contains a digit
void setValueString value This does the same as the overloaded constructor that takes a string
BigDecimal addBigDecimal Adds the values together and returns the result as a Big Decimal
BigDecimal subBigDecimal Subtracts the two values and returns the result as a BigDecimal
Note: If you are using C feel free to use the operator instead of the add function.
I am going to let you off the hook for the multiply and divide but it should be easy to implement.
Accessors
double toDouble Returns the value stored in the container as a double
String toString Returns the value store in the container as a string
Char atint index Returns the value at the particular index as a Char
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
