Validate User Input Using Java Chars and Strings

tapastdas
cf_4validate_user_input_instructions.pdf

Validate User Input Using Java Chars and Strings In this assessment, you will design and code a Java console application that validates the data entry of a course code (like IT4782) and report back if the course code is valid or not valid. The application uses the Java char and String data types to implement the validation. You can use either the Toolwire environment or your local Java development environment to complete this assignment.

The requirements of this application are as follows: The application is to read a course code entered by the user from the keyboard. The course code is made of 5 characters and should follow these rules:

• First character is always an upper case I or a lower case i

• Second character is always an upper case T or a lower case t

• Third, fourth, fifth, and sixth characters are always digits (0-9)

The application then validates the course code against above the rules and prints a message if the course code is valid or not. If the course code is not valid, the application should print a message explaining why the course code is not valid.

Use these course codes to test your application:

• IT4782

• IT4782

• OT4782

• it&782

Successful completion of this assignment will show a valid message or an invalid message for the entered course code. In addition, if the course code is invalid, the application should identify the reason for the invalidation. Your program output should look like this sample output:

5

Follow these steps to complete this assignment:

1. Create a NetBeans Java console application project called “U4A1_ValidateCourseCode”.

2. Develop the application to meet the stated requirements.

3. Compile and test your application using the provided input data.

4. Make sure to document the result of your testing by taking screenshots of the result of running your application similar to the provided sample output. Four screenshots are required for this assignment.

5. Explain the approach you took to complete this assignment and the major decisions you made. As part of your explanation, be sure to identify the fundamental Java constructs you used that were specific and relevant to your submitted program.

Deliverables Use the submission template (WeekXSolutionSubmissionTemplate.docx) to complete and submit your deliverables. Your deliverables in the attached submission template should include:

1. Your work (Netbeans project zip file + copy of *.java source code)

6

2. Screenshots of the result of testing your application. See the examples above.

3. Explain the approach you took to complete this assignment and the major decisions you made. As part of your explanation, be sure to identify the fundamental Java constructs you used that were specific and relevant to your submitted program.

Your work will be scored on the following criteria:

1. Design a program that meets given specifications.

2. Code an application that validates data entry.

3. Test the application and document testing.

4. Explain the approach taken to complete data validation and the major decisions made.

5. Identify relevant fundamental constructs in submitted program.

6. Communicate efficiently, effectively, and in an appropriate manner as an IT professional.

  • Validate User Input Using Java Chars and Strings
    • Deliverables