用dr.java编程作业不会写 求大神帮帮忙 还有2小时作业就要due了!!!!谢谢大家!!!!

Writeaprogramthatgeneratesallpossible5letterpasswordscontainingonlylowercaseletters,u... Write a program that generates all possible 5 letter passwords containing only lowercase
letters, uppercase letters, and/or digits. For example, “rot13” would be such a password, but
“32-Ax” would not because it has a hyphen. There are 62 letters to use (26 + 26 + 10). There
are 625 = 916132832 possible passwords.

Test each password you generate to determine if it satisfies the following rules:

COMP 1010 Fall 2014 Assignment 3 Page 2 of 6

 At least one lowercase letter;

 At least one uppercase letter;

 At least one digit;

 No character can appear twice in a row (e.g. “Haax5” is not valid, but “Ha5ax” is).

Count the number of valid passwords that satisfy the rules.

Suppose you have forgotten your password for a password-protected website. Your userid
at that website is your student ID. You decide to generate all valid passwords (according to
the above rules) and try them out as your password, together with your student ID as the
userid. That might work (but perhaps not – you might have chosen a password that doesn’t
follow these rules). Download the class file “BreakThisPassword.class” from the course
website and place it in the same folder as your code. Try each password you generate by
calling BreakThisPassword.login(studNum, password), where studNum is your
student number. This method returns a message as a String value. If the returning String is
not null, print out the password and the message.

The only program input required is a student number, obtained through JOptionPane.
Assume the user will enter a valid student number, without checking. The input prompt and
response should be echoed to the console output.

Hint: Get your code working with 3 character passwords and a smaller range of letters (‘a’
to ‘d’, ‘A’ to ‘D’, ‘0’ to ‘4’). Then try to scale it up to full letter ranges, and then to full size. It
will make debugging problems much simpler. BreakThisPassword.login is designed to
handle passwords of any length.

Hint: When you deal with five characters, running the program can take a long time
(minutes). It is a good idea to print a progress indicator, as shown in the sample output,
displaying the least rapidly changing letter of the password as it changes, so that the user
can estimate how long running the program will take.
展开
 我来答
晋红豆33
2014-11-05 · TA获得超过124个赞
知道小有建树答主
回答量:331
采纳率:0%
帮助的人:78.7万
展开全部
你把这个发到yahoo提问上去, 外国人会帮你写
百度网友f0f9883
2014-11-01 · TA获得超过317个赞
知道小有建树答主
回答量:258
采纳率:100%
帮助的人:155万
展开全部
我有心给你写代码 也没心思看这么长的英文。。
追问
不好意思 题目是英文的!!!
拜托啦!!!!
实在不会!!!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式