Win a copy of Terraform in Action this week in the Cloud forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

can anyone help me

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
lowercase baba
Posts: 13014
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic