ok I have a program that is suppose to use dialogs boxes to obtain input and display output and also use console input an output. But here is the thing, I believe my code is a little right but don't understand the errors, can somebody help me please, here is my code:
//Input: to obtain interest
//Process: Calculate interest by balance and annual interest rate
//Output:Display interest in dialog and console input and out put
//Purpose: to obtain interest
public class Interest {
public static void main(String [] args) {
//creat a scanner for input
java.util.Scanner keyboard = new java.util.Scanner(System.in);
//declare variables
double annualInterestRate;
double balance;
double interest;
//Enter annual interest rate
double annualInterestRate = keyboard.nextDouble(letters);
//Enter balance
balance = keyboard.nextDouble(numbers);
//declare interest
interest = keyboard.nextDouble(symbol);
//Calculate payment
interest = balance * (annualInterestRate / 1200);
//Format to keep to decimal points
interest = (int)(interest * 100) / 100.0;
//Input results
String letters = javax.swing.JOptionPane.showInputDialog("Enter annual interest");
String numbers = javax.swing.JOptionPane.showInputDialog("Enter balance");
//Display results
System.out.println("The interest is " + interest);
javax.swing.JOptionPane.showMessageDialog(null, "output data");
}
}