Thank you for the help CodeMasterFlex and Banderson. It really did help me get started so I didn't go in cold turkey when I went to visit my instructor. So again, I really appreciate it everyone!
Also the other reason why I'm posting here is I need some help, again. So after slaving away for a week, day and night (ignoring my other classes), this is what I have:
import java.io.*;
public class MakeChange
{
static BufferedReader keyboard = new BufferedReader
(new InputStreamReader(System.in));
public static void main (String [] args) throws IOException
{
System.out.println ("Program to calculate change");
System.out.println ();
int number;
String line;
int dollarsDue;
int centsDue;
int customerDollars;
int customerCents;
System.out.println ("Enter number of dollars due:");
line = keyboard.readLine();
dollarsDue = Integer.parseInt(line);
System.out.print ("Enter number of cents due:");
line = keyboard.readLine();
centsDue = Integer.parseInt(line);
System.out.print ("Enter number of dollars from customer:");
line = keyboard.readLine();
customerDollars = Integer.parseInt(line);
System.out.print ("Enter the number of cents from the customer:");
line = keyboard.readLine();
customerCents = Integer.parseInt(line);
It seemed to work on the compiler, but if anyone has any suggestions to improve it in terms of spacing or whatever, feel free to jump in and post any comments or suggestions.
But this is where I'm at a dead end again. Now I need some help coding the calculations and/or output (?), well the next part. I'm supposed to take the input of dollars due and add it to the number of cents due to get the amount due. Then the same with number of dollars and cents from the customer to get the amount submitted. Then when that's taken care of, subtract the amount submitted with the amount due to get the final amount of change. And in the process convert the dollars into pennies. So say for example:
Enter number of dollars due: 3
Enter number of cents due: 13
Enter number of dollars from the customer: 5
Enter number of cents from the customer: 0
(input shown in red)
So then the output's supposed to look something like this:
$3.13 is due
$5.00 is submitted
The change is $1.87
...which is the part I need help coding. And the weird thing is I'm not supposed to use type double here (and I see three, count 'em, three decimal points), which makes it even more confusing.
Also another question, how and when do you use final variables? Do I have to use it for this part of the program? My instructor told me that I'd be needing to use them a lot at some point.
And excuse me if I butchered any terminology, which I'm pretty sure I did; hey I'm still learn'. So if anyone would be kind enough to help me out again (particularly on what I'm asking for help, though any additional feedback is welcome), you'll make a lowly, poor college student happy.
Thanks y'all!
;)