The brackets seem to pair up nicely...
The last bracket, isn't it supposed to pair up with the one after "public static void"?
package javaapplication11;
import javax.swing.JOptionPane;
/**
...
Type: Posts; User: Plural
The brackets seem to pair up nicely...
The last bracket, isn't it supposed to pair up with the one after "public static void"?
package javaapplication11;
import javax.swing.JOptionPane;
/**
...
if(packageLetter!='A' && packageLetter!='B' && packageLetter!='C')
{
JOptionPane.showMessageDialog(null, "Please enter either A,B, "
+ "or C).");
}...
I've fixed those.
Now, whatever I enter...it becomes "Please enter either A, B, or C."
package javaapplication11;
import javax.swing.JOptionPane;
/**
*
* @author Home
*/
I've changed it but on the sides, it says identifier expected and I'm not too sure where to put the brackets for the "if-else if-else".
package javaapplication11;
import...
After execution, the message dialog appears for:
package A
package B
the default
So...therefore, I have to use else if? When I did that the error on side says that it should be "else without...
It works but now I want to change a bit instead of using the switch statement:
I'm not too familiar with using if-else if-else statements.
Here's the code source:
package javaapplication11;...
The brackets for the "if statement" makes the variable "additionalHoursFee" not initialized for the statement "totalFee = monthlyFee + additionalHoursFee;"
Even when I tried it with another way, it...
I've done the things that you've asked me to change.
The problem is pretty similar to my question.
How do I make the minimum monthly fee appear instead of it being less?
e.g. package 'A': 10 hours...
All the answers that is above 10 hours for 'A' and 20 hours for 'B' are correct expect the ones that are under 10 hours for 'A' and under 20 hours for 'B' are incorrect.
For 'A':
I can enter any...
Yes, the program works.
As you can see, the program is suppose to compute the fee for the current month's internet service.
For the first question from my code:
It asks me to input the letter of...
To the first question:
I want to change the answer that would show in the message dialog as a 2 decimal value instead of the 16 decimal value.
To the second question:
Yes, I've debugged it. It...
What I meant was that I am able to get the value for the computations but not the minimum value:
for example, for case 'A' I enter 4 hours and I will get $-2.050000000000007 instead of $9.95.
In...
What to do with this JAVA code?
This is the code that I need to do:
An Internet service provider has three different subscription packages for its customers:
Package A: For $9.95 per month 10...