Search:

Type: Posts; User: Plural

Page 1 of 2 1 2

Search: Search took 0.21 seconds.

  1. Replies
    3
    Views
    2,872

    Re: Method returning boolean

    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.
  2. Replies
    3
    Views
    2,872

    Method returning boolean

    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...
  3. Replies
    2
    Views
    2,111

    Re: Input/Output file help

    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...
  4. Replies
    2
    Views
    2,111

    Input/Output file help

    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...
  5. Replies
    3
    Views
    3,771

    Re: Input/Output file help

    I have it on my computer, but it somehow can't find it.
    Where should I be saving it?
  6. Replies
    3
    Views
    3,771

    Input/Output file help

    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...
  7. Replies
    3
    Views
    4,828

    Re: Help with Nested Loops

    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...
  8. Replies
    3
    Views
    4,828

    Help with Nested Loops

    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....
  9. Replies
    2
    Views
    487

    MessageDialog working with DecimalFormat?

    package internetserviceproviderpart2;
    import javax.swing.JOptionPane;
    /**
    *
    * @author Home
    */
    public class Main {

    /**
    * @param args the command line arguments
  10. Replies
    5
    Views
    3,527

    Re: Need If-Else if-Else help on my code

    This statement got me pretty confused.
    Can you include the Message Dialog for me so it can clear up my confusion?
  11. Replies
    5
    Views
    3,527

    Re: Need If-Else if-Else help on my code

    I've changed up my code:
    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    package internetserviceproviderpart2;
    import...
  12. Replies
    5
    Views
    3,527

    Need If-Else if-Else help on my code

    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...
  13. Replies
    5
    Views
    2,072

    Re: Public class help/error

    I changed it just now but it is still the same problem.
  14. Replies
    5
    Views
    2,072

    Re: Public class help/error

    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...
  15. Replies
    5
    Views
    2,072

    Public class help/error

    Here is my code:


    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    package internetserviceproviderpart2;
    import javax.swing.JOptionPane;
  16. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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;
    /**
    ...
  17. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    if(packageLetter!='A' && packageLetter!='B' && packageLetter!='C')
    {
    JOptionPane.showMessageDialog(null, "Please enter either A,B, "
    + "or C).");
    }...
  18. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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
    */
  19. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
  20. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
  21. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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;...
  22. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
  23. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
  24. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
  25. Replies
    26
    Views
    9,189

    Re: JAVA help on file: Internet Service Provider

    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...
Results 1 to 25 of 28
Page 1 of 2 1 2