Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Code critique: Java -counting change program

$
0
0
I am asking if my code is sound and efficient, I am just a week into Java, and I have noticed professors tend to teach the easiest way, not bashing any professors, BUT industry professionals tend to use better formats which use less code.

I just want anyone's opinion or comment/suggestion, because I believe the less code, the more efficient, the better. Right?

Here's my homework question:

Create a program named change.java. Using input dialog boxes or console input, prompt the user how many pennies, nickels, dimes, and quarters they have. Using a message box or console output, tell the user the total dollar amount of money they have.


Here's what I have, but I just feel like it could be better. Thanks for any and all comments/suggestions:



Spoiler

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>