Search:

Type: Posts; User: CDeighan

Search: Search took 0.38 seconds.

  1. Replies
    3
    Views
    160

    Your findOpenLocker method doesn't have a type....

    Your findOpenLocker method doesn't have a type. It's just public static, it should be public static void or Boolean or int or string. Whatever u want the method to return.

    That's the only thing I...
  2. Replies
    2
    Views
    169

    X is essentially a new Scanner object and...

    X is essentially a new Scanner object and therefore cannot be compared to the value 5.

    You need to something like this below

    Scanner scan = new Scanner(System.in)

    System.out.println("enter...
  3. Replies
    5
    Views
    256

    IMO programming isn't something that can be...

    IMO programming isn't something that can be specifically "taught". It's something that is taught by trial and error and consistently doing it and practicing.

    A lecture gives directions and tells...
  4. Replies
    6
    Views
    484

    [SOLVED] Do you not need to use .equals() when comparing...

    Do you not need to use .equals() when comparing strings
  5. Thread: HELP

    by CDeighan
    Replies
    3
    Views
    152

    Re: HELP

    Hi mate

    i looked through your code there and i got it to work regardless of where i put the two digits. however inside your for loop you should take out the -1 condition as it won't loop the...
  6. Where are you giving the location of fileName?? ...

    Where are you giving the location of fileName??

    I think you should have

    File newFile File(file.txt); in the main method.
  7. iterative statements, writing to files, nested loops

    Better to use a while loop as there is a method called eof or .endOfFile() which will
    Continue reading until end of the file is reached.

    So it would be something like this

    while(!myFile ....
  8. You would need to have a loop either a while or...

    You would need to have a loop either a while or do while until they enter "start" then the main program starts.

    That'll be up to you to decide what happens if they enter the correct or incorrect...
  9. Replies
    4
    Views
    182

    @Norm I quoted three because that's what the...

    @Norm

    I quoted three because that's what the user asked for above.

    No my comment doesn't mean they must try three times. If they don't get the correct password - increment counter - then check...
  10. Replies
    5
    Views
    161

    You need to assign a value to n, I assuming that...

    You need to assign a value to n, I assuming that this will be input from the user. If so you will need to use the Scanner class to gain input from the user.
  11. Replies
    4
    Views
    182

    Step 1:Have a new int call counter. Step...

    Step 1:Have a new int call counter.
    Step 2:Increment the counter each time the person doesn't log in successfully.
    Step 3: Check if the counter = 3 , if it doesn't exit the system.
  12. I'll take a look at this tomorrow mate post up...

    I'll take a look at this tomorrow mate post up some additional help when I get In front of PC.
  13. char first = response.charAt(0); Repeat then for...

    char first = response.charAt(0);
    Repeat then for the rest of the requirements.

    If(first == 'R')
    {
    If(nextChar == 'R')
    {
    }
    }
  14. Replies
    2
    Views
    149

    Is this JavaScript from a controlled assessment...

    Is this JavaScript from a controlled assessment from OCR GCSE Computing??
  15. First of you need ask the user for an input and...

    First of you need ask the user for an input and assign that to a variable.

    Now you need loop through the inputted string using the charAt method and check each character within the string to...
  16. You should always initialise variables with a...

    You should always initialise variables with a value. If they're not given a value, they get assigned null.
  17. Replies
    4
    Views
    458

    That's a great little problem there to solve...

    That's a great little problem there to solve using Java.

    You just need to sit down and write yourself out an algorithm as Ada has stated, and make sure all steps are included. Whenever they are,...
  18. Yeah there's no average calculation there in that...

    Yeah there's no average calculation there in that code, counter / temperature is not logically correctly.

    You don't need a counter as you say there's 7 temperatures so you should just divide it...
  19. Replies
    2
    Views
    475

    [SOLVED] Book Club Points

    As Norm says you haven stated what problems your having.

    But looking through your code - I would have another "else if" statement for numberofbooks == 4, and then have another else as an invalid...
Results 1 to 19 of 20