I know that but, what part of the code do I change in order for it to make certain values to become "false" which is supposed to be false, whereas "true" is true.
Type: Posts; User: Plural
I know that but, what part of the code do I change in order for it to make certain values to become "false" which is supposed to be false, whereas "true" is true.
Assignment:
isPrime Method
A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number...
What do I have to change in order for it to happen?
Ah, I found out why the output wasn't Upper Case.
It was because I didn't put .toUpperCase() in back of it.
I think the file would've been...
Upper File Converter
Write a program that asks the user for the names of two files. The first file should be opened for reading and the second file should be opened for writing. The program should...
I have it on my computer, but it somehow can't find it.
Where should I be saving it?
Assignment:
Uppercase File Converter
Write a program that asks the user for the names of two files. The first file should be opened for reading and the second file should be opened for writing. The...
The assignment says that it should loop 12 times, once for each month. Thus, it should be months<=12.
I think I'll have to put an "if-statement" in the inner loop; but what do I put as the boolean...
Assignment:
Average Rainfall
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. First the program should ask for the number of years....
package internetserviceproviderpart2;
import javax.swing.JOptionPane;
/**
*
* @author Home
*/
public class Main {
/**
* @param args the command line arguments
This statement got me pretty confused.
Can you include the Message Dialog for me so it can clear up my confusion?
I've changed up my code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package internetserviceproviderpart2;
import...
Task Part 1:
An Internet service provider has three different subscription packages for its customers:
Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per...
I changed it just now but it is still the same problem.
My file's name is Internet Service Provider Part 2.java
I changed
public class Main
into
public class internetserviceproviderpart2 {
There is still a red squiggly line under it saying...
Here is my code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package internetserviceproviderpart2;
import javax.swing.JOptionPane;
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...