QuestionQuestion

Wordlist generator in Java (Object Oriented)

Use: Inheritance, Polymorphism, Arrays, String class methods

The classes in this project:

+ Charlist.java

- Generate.java

+ TestGenerate.java

The Charlist Class will have the alpha-numeric, numeric, something like this:
ualpha-numeric = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
ualpha = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
lalpha-numeric = [abcdefghijklmnopqrstuvwxyz0123456789]
lalpha = [abcdefghijklmnopqrstuvwxyz]
numeric = [0123456789]

The Generate class will be the “Engine class” that will generate the word list, line-by-line for example: if user want to generate a numeric list from 0 to 8 ... the Generate class will generate the numbers and append it to a file on the disk. Now the TestGenerate.java class will be the interface for the user, using Scanner to take user options to start generate, after taking user options the class Engine should generate the wordlist deepened on the user input options, then save it on the disk.

The options in TestGenerate.java class are:
charlist type: numeric, lalpha-numeric, ualpha-numeric...etc
range of the wordlist
file name to save the wordlist

More details:

ok example:

1- the user run the class has the main method
2- message appear like this:

Options:

Characters type:
ualpha-numeric: Upper alpha characters with numbers [ABCD134.9...Z]
ualpha: Upper alpha characters [ABCD...Z]
lalpha-numeric: Lower alpha characters with numbers [abcd1234.9..z]
lalpha: Lower alpha characters [abcd..z]
numeric: [0123456789]

Length:
Input Length of the characters in one word
[MinLength-MaxLength]
Ex: 8-8
This will generate a word list with minimum 8 characters in the one word and maximum 8 characters

AAAAAAAA
AAAAAAAA
....
AAAAAAAA
####################################

3 - message appear ask user to input file name to save the word-list:

"Please specify file name"

4 - the program will start generate the list and after done it should save the list generated in the file specified

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Generate {
private int min, max; //Hold data for min, max, list to use etc
private char[] charList;
private Charlist list;
private PrintWriter writer;

public Generate(Scanner input)
{
this.getFile(input); //Get file to write to
this.getMinMax(input); //Get min and max word sizes
list = new Charlist(); //Get the list we're to work with
charList = list.getList(input);
}

private void getFile(Scanner input) //Gets our file and opens it
{...
$125.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats