Java Programing: Non-Zero Denominations
Not what you're looking for?
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
23 dollars
2 quarters
1 dime
1 nickel
2 pennies
The input and output must use JOptionPane dialog and display boxes.
Purchase this Solution
Solution Summary
This response provides guidelines on writing a Java program that only displays non-zero denominations.
Purchase this Solution
Free BrainMass Quizzes
Basic Networking Questions
This quiz consists of some basic networking questions.
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
C# variables and classes
This quiz contains questions about C# classes and variables.