Bookmark Topic Watch Topic
  • New Topic

can anyone help me  RSS feed

 
vuthlarhi donald
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Report post to moderator
Write a class that does the following:
- Creates 10 instances of your person class with all the information filled in (names, email, username, password etc).// I can do this in the main method
- Prompts a user to enter their username and password.//where do I place this, in the main method or in the constractor
- if the username/password combination exists for one of your ten users then print out a welcome message as well as all the details of that user.//how do I determine that
- if the username/password combination fails, allow them to try again.
- if they have filled in the wrong username/password combo for 3 times, display a message informing them of this and quit.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
[edit] PLEASE don't post the same question more than once. nothing is more annoying than posting a response, only to find another copy of the question where a discussion is already taking place. I am closing this thread - any follow-ups should be done over here.
[/edit]

the constructor is for making objects. you set up the basic stuff needed for your object to be in a valid state here.

so, when you are creating a person object, for your project, do you need to prompt someone for this information?

[ January 10, 2008: Message edited by: Fred Rosenberger ]
[ January 10, 2008: Message edited by: Fred Rosenberger ]
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!