Level contains the lines in each paragraph

Assignment Help Business Management
Reference no: EM132399202

If a 3-Dimensional array is defined by the following statement where the first level (dimension) contains the pages, the second level contains the paragraphs in each page, and the third level contains the lines in each paragraph:

final String [ ] [ ] [ ] book = {

{//text 1} , { //text 2} , {//text3} }

What is the Java code that will generate a password from this array respecting the following restrictions:

1. A password is composed of three words.

2. The page number, paragraph number, and line number are chosen randomly. You must use the java.util.Random class to generate random numbers using the nextInt() method.

3. Convert the String from the chosen line into an array of words using the split(" ") method (space as the separator).

4. Choose a random word from the array in Step 3. (Hint: the length attribute of an array will tell you how many words are in the array.)

5. If a word is composed of only a single character (e.g., "a"), or the word contains the newline character ('n'), go back to Step 2.

6. When you have three words, concatenate them to form a candidate password, and apply the following steps. You can use the compareTo() method from the String class

(but no HashSet). Restriction: Don't use any method from the Character class.

a. No two words can be exactly the same (e.g., "theAlicethe" isn't allowed, but "the" and "The" are accepted). Otherwise, go back to Step 2.

b. The password must be of at least 8 characters long but under 16 characters. Otherwise, go back to Step 2.

c. The password must contain an uppercase character. Otherwise, go back to Step 2.

d. The password must contain a lowercase character. Otherwise, go back to Step 2.

e. The password must contain only one special (non-alphabetic) character. Otherwise, go back to Step 2. Restriction: Don't use any method from the Character class.

f. If all conditions are met, you print the password, along with the number of password generation attempts that failed due to: (i) having a newline character, (ii) having a single.

character word, (iii) having the same words, (iv) not meeting the uppercase requirement, (v) not meeting the lowercase requirement, (vi) not meeting the special character.

Requirement.

7. You continue generating passwords until you generate a total of 10,000 passwords, OR if you generate a password where the count for item (v) in Step 6 f) is non-zero.

Reference no: EM132399202

Questions Cloud

Type in command that help you locate those commands : In PowerShell Scripting, You need to locate commands that deal with printers. Type in command that help you locate those commands.
711SHRM Strategic Human Resource Management Assignment : 711SHRM Strategic Human Resource Management Assignment Help and Solution - Australian Institute of Business, Australia. Write a report about HRM issue
Analyze the sas organics dataset : Analyze the SAS ORGANICS dataset provided with this assignment. Follow the high level procedure given below to create a SAS data source.
Analyze this dataset and put summary of findings in jupyter : Analyze this dataset and put the summary of findings in Jupyter notebook based on the analysis. Put what you think are the most interesting findings.
Level contains the lines in each paragraph : If a 3-Dimensional array is defined by the following statement where the first level (dimension) contains the pages, the second level contains the paragraphs
What is the advantage of analysis dashboards : What is the advantage of analysis dashboards? Give an example of application dashboards.
722CGOV Corporate Governance - Concepts and Practices : 722CGOV Corporate Governance: Concepts and Practices Assignment Help and Solution - Australian Institute of Business, Australia
Phases of developing an enterprise security system : Briefly describe a business impact analysis (BIA) and what it estimates and identifies.
Analyze the time required and give corresponding pseudocode : Give the algorithm iteratively with memoization. Analyze the time required and give corresponding pseudocode

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd