Question: Can anyone help me with this program and please use the class with this program , like class sting id; sting ...; 1. (40points) Write

Can anyone help me with this program and please use the class with this program , like class sting id; sting ...;

1. (40points) Write a Java program to create username. Your program must satisfy the following requirements:

All the usernames must be stored into text file (user.txt)

You have to use array structure in your program.

Username isn't case sensitive.

Username requires at least 4 characters and at most 8 characters

You can't create a username starting with a number.

You can't create a username starting with question mark `?`

You cant create a username already in use.

Before you create a username, you should read all the usernames from the text file (user.txt), and store the username into an array. After this step, you should display all the usernames from the array (not directly from the text file). In the case of failure to meet the requirement 4, 5, 6, and 7, you should display an appropriate warning message for each case and ask user to input a new ID. If a new username satisfied all the requirements, the username should be saved into the text file (user.txt). After saving the username, you have to read the text file, store the username into an array, and display a list of usernames once again. You are to introduce at least three methods other than main: for reading a file, for writing a file and for checking inUse.

Check Point and Deduction: (Please check this before submitting)

Check point

Deduction (points)

No Array or No data file reading/writing or No at least three methods other than main

40

No usernames display (at beginning)

10

No usernames display (after saving new to user.txt)

10

Requirement 4 (not work)

10

Requirement 4 (work but no warning message)

5

Requirement 5 (not work)

10

Requirement 5 (work but no warning message)

5

Requirement 6 (not work)

10

Requirement 6 (work but no warning message)

5

Requirement 7 (not work)

10

Requirement 7 (work but no warning message)

5

No comment (program head)

4

No comment (each method)

User.txt = bellevueCS210 Iloveyou

 Can anyone help me with this program and please use theclass with this program , like class sting id; sting ...; 1.

4

Project settings Toole Window Hep a stiwa import java io. import java util public class username public static string me new string 100 public static int howMany; public static void main (string args) throws while (true) Scanner console new Scanner (System.in Scanner input new Scanner (new File user txt howMany read File (input); 13 the end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!