Write a Java program that displays the non-zero denominations only. Display singular words for single units like 1 dollar and 1 penny, and display plural words for more than one unit like 2 dollars and 3 pennies. (Use 23.67 to test your programs.)
If the user enters zero or a negative amount, my program should exit properly and display a message stating that the amount entered by the user was zero or negative.
If input is 0, my output should be:
My amount is zero.
If input is -2000.25, my output should be:
My amount is negative.
If input is 23.67, my output should be:
My amount 23.67 consists of
The input and output must use JOptionPane dialog and display boxes.© BrainMass Inc. brainmass.com March 4, 2021, 8:36 pm ad1c9bdddf
This response provides guidelines on writing a Java program that only displays non-zero denominations.