Write a program that asks the user for two BigDecimal values and then displays the results when the given values are used with the BigDecimal methods add, subtract, multiply, divide, toString, equals,...


Write a program that asks the user for two BigDecimal values and then displays the results when the given values are used with the BigDecimal methods add, subtract, multiply, divide, toString, equals, and compareTo. For example, your program’s output might appear as follows:


This program displays the result of calls to various BigDecimal methods.


Enter your first BigDecimal number: 3.0


Enter your second BigDecimal number: 5.0


3 + 5 = 8


3 - 5 = -2


3 * 5 = 15


3 / 5 = 0.6


3.toString() is 3


5.toString() is 5


3.equals(5) is false


3.compareTo(5) is -1



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here