• Post Reply 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

write please help me

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 76811
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 76811
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 5466
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic