• Post Reply Bookmark Topic Watch Topic
  • New Topic

write please help me  RSS feed

 
badar AlRahbi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a program that will do the following:
Step 1. Prompts the user to enter a String word that consists of at least 6 letters and at least one digit/number in the entered String word.
1.1 Check whether the user has entered at least 6 letters in the entered word by displaying to the length of the user entered String word, and prompt the user to re-enter the word again if the word length is less than 6 letters. Hint: String.length() method and do{}while().
1.2. Check whether the user has entered at least one digit/number in the entered word. Hint: Character.isDigit(value) method along with value=charAt(i) method to read every character value in the entered String word.
Step 2. Prompts the user to reconfirm the word entered in Step 1, by asking the user to re-enter the same word he/she entered in Step 1.
2.1 Check whether the two words entered in Step 1 and Step 2 are matching (equal without ignoring cases). Hint: equals(string) method, or compareTo(string) method.
2.2 Allow the user 3 trials "only" to re-enter the same word entered in Step 1, and if he/she fails to enter the same word after 3 times, display a message to the user to try again after 2 minutes!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to have forgotten to post your code and a description of the problems that you are having with it. Please be sure to UseCodeTags when posting your code.
 
badar AlRahbi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:You seem to have forgotten to post your code and a description of the problems that you are having with it. Please be sure to UseCodeTags when posting your code.


i just want the code how to write it
 
Campbell Ritchie
Marshal
Posts: 55770
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
You would do well to divide that task into stages. Start with part 1 and when you can print the password entered, you know you have got the first stage working.
 
Campbell Ritchie
Marshal
Posts: 55770
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
badar AlRahbi wrote:. . . i just want the code how to write it
That is not how this website works.
 
badar AlRahbi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Welcome to the Ranch
You would do well to divide that task into stages. Start with part 1 and when you can print the password entered, you know you have got the first stage working.


how , this is my question
 
Henry Wong
author
Sheriff
Posts: 23283
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
badar AlRahbi wrote:
Campbell Ritchie wrote:Welcome to the Ranch
You would do well to divide that task into stages. Start with part 1 and when you can print the password entered, you know you have got the first stage working.


how , this is my question



Okay, if you can't do step one, let's step back a bit. How do you read input from the user? Have you learn that yet?

Henry
 
Tim Cooke
Marshal
Posts: 3873
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not that we can't do it. It's more that we won't do it for you.

This site is all about helping people learn how to program and learn how to be great programmers. The key ingredient of learning for yourself is to do the work yourself. We have a Wiki page that explains our motivations about homework in more detail -> DoYourOwnHomework.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!