Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21
    p0rnstar is offline Member
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    0

    Default

    so the biggest problem for my right now that i cant write code: GUI, first it should ask name (name should be between 2-15 letters, if not, it should ask again) if its correct than ask for age ( between 18-65)
    if there is an error it should ask again. could somebody could help me with this, or u know where i can found information

  2. #22
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Well, please understand that we're not going to write code for you (except some idiots who have given you some exceedingly bad code). You must learn to write it yourself, since that's the object of your homework, and in that regard we are more than willing to help you. So again, get all Scanner code out of your new class, give it a try using JOptionPanes instead, and then post your own code if you're still having problems and let's work with it.

    Again, much luck.

  3. #23
    Newbie666 is offline Member
    Join Date
    Jan 2010
    Posts
    46
    Rep Power
    0

    Default

    It really doesn't matter which way you go.
    I disagree, while some users are cautious and careful some are not and unfortunately as programmers we need to cater for all individuals, it's better to learn and work out how to do proper validation now that putting it off for a later date.

    Like Jos commented "What if he/she does this!...."

    edit: I also think validation is implied here as the requirements for the homework seem to suggest validation.
    if there is an error it should ask again
    recursive statement
    Last edited by Newbie666; 01-22-2010 at 05:02 PM.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 01-11-2010, 07:48 AM
  2. small doubt
    By ravi kumar in forum Java Software
    Replies: 1
    Last Post: 08-02-2009, 04:50 PM
  3. small problem
    By barusk in forum Networking
    Replies: 4
    Last Post: 03-21-2009, 07:19 AM
  4. Urgent small code
    By karingulanagaraj in forum New To Java
    Replies: 7
    Last Post: 08-11-2008, 05:11 AM
  5. Small problem
    By ayoood in forum New To Java
    Replies: 2
    Last Post: 06-06-2008, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •