View Single Post
Old 08-11-2012, 02:38 AM   PM User | #1
dannyboi
New Coder

 
Join Date: Jul 2012
Location: NYC
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
dannyboi is an unknown quantity at this point
Does not show the if statements in any way?

import javax.swing.JOptionPane;
public class Main{





public static void main(String[] args) {
// declare your variables still
int salesTotal = 5;
double commissionRate = 10;
int salesClass = 10;

if (salesTotal < 10000) {
if (salesClass == 1)
commissionRate = 0.02;
}
else if (salesClass == 2) {
commissionRate = 0.025;
JOptionPane.showMessageDialog(null, "Commission is " + commissionRate+salesClass+salesTotal);
}

}
}

Will not show me the if statements. Is it the fact I forgot to put in the InputMethod?
dannyboi is offline   Reply With Quote