Write code that will save data to a file

Assignment Help JAVA Programming
Reference no: EM13825466

Create a new project

You will write three tests for Regular Expressions (REGEX)

1. The user will enter an 8 digit Drexel ID. The REGEX will evaluate if it is valid or not. You can accept either 8 digits, or 6 digits followed by a hyphen, and then the last 2 digits.

Acceptable Drexel IDs values could be:
12341234
123456-78

2. The user will enter a Drexel course code. The course code beings with two capital letters, followed by an optional hyphen, followed by 3 digits, and followed by an optional section number (which is a hyphen followed by 3 digits)

Acceptable Drexel IDs values could be:
CT290
CT370-609
EN-371
CS-412-515

3. The user will enter a valid Drexel password based on the following algorithm: It must be at least 8 characters in length. It must have at least one capital letter. It cannot end with a number.

Acceptable Drexel password values could be:
Sparky47x
1234567X
Password (what a terrible password, but it's acceptable)
ABC123xy

In the same project, ask the user (via Scanner readers) to enter their first name, middle name, last name, birth month, birth day (of the month), Drexel ID, Drexel Course Code, and Drexel password.

Check (via the REGEX you wrote in part 1) that the Drexel data is valid.

Write code that will save data to a file. The file will be named "Unit8.txt" When opened with a text editor, the file might read as follows:

Coded by: (Your Name)
This file name: Unit8.txt
First Name: Robert
Middle Name: John
Last Name: Watson
Birth Month: 5
Birth Day: 28
Drexel ID: 343467-01
Drexel Course Code: MA-230-818
Drexel Password: SecretWord

Ask the user for the filename to save the code. So, instead of saving it to Unit8.txt, they could save it to MyProjectData.data

Write a REGEX that verifies that file name is only 8 characters, followed by a period, followed by a 3 letter extension. So, the above name of MyProjectData.data, would be wrong, but they could save it to a filed named MyData.dat

Include Exception Handling to verify that only digits are entered for the birth month and birth day.

Modify the Drexel Password checker to include at least one number in the password. Again, it cannot be the last character.

Create an email for this user. The email is their initials and the first three digits of their student ID. In the above example, the email created would be: RJW343. Report this in the printout.

If all of the extra credit is done, a possible printout would be:

Coded by: (Your Name)
This file name: MyCode.inf
First Name: Robert
Middle Name: John
Last Name: Watson
Birth Month: 5
Birth Day: 28
Drexel ID: 343467-01
Drexel Course Code: MA-230-818
Drexel Password: DontAsk7z
Drexel Email: RJW343

Reference no: EM13825466

Questions Cloud

Caselet: katsand wines : Caselet: Katsand Wines
Prepare statement of retained earnings for the year ended : Powder Corporation began operations on January 2, 2013, with a total investment of $150,000 by its stockholders. Net income for its first year of business was $90,000. During 2014 and 2015, net income increased to $188,000 and to $217,000, respective..
Prepare a budgeted income statement for each quarter : The question relates to Basic Accounting and it discuss about preparing sales, purchases and distribution, cash budget, income statement and balance sheet for an organization
Compute the incremental profit from accepting special order : Mohave Corp. makes several varieties of beach umbrellas and accessories. It has been approached by a company called Lost Mine Industries about producing a special order for a custom umbrella called the Ultimate Shade (US). Compute the incremental pro..
Write code that will save data to a file : The user will enter a Drexel course code. The course code beings with two capital letters, followed by an optional hyphen, followed by 3 digits, and followed by an optional section number
Identify costs that have been incurred and cannot recovered : These multiple choice problems belong to Economics. The first problem is about identifying the costs that have been incurred and cannot be recovered and the second problem is about the demand curve for an individual firm in the short run would be.
Weighted average method of inventory costing : Browning Company had 8,700 units in beginning inventory with accumulated costs for direct materials of $17,900, $16,500 direct labor, and $13,200 of overhead. During July, the company completed and transferred 50,000 units to finished goods. Compute ..
Can you solve the given equation : Can you solve the given equation
Determine the free cash flow-replace existing capacity : Morrocan Marble Company has cash flows from operating activities of $332,000. Cash flows used for investments in property, plant, and equipment totaled $63,000, of which 60% of this investment was used to replace existing capacity. Determine the free..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write the buttonhandler inner class

The output string should say something like this: "The RC time constant for resistance 1000 and capacitance .000001 is 0.001 seconds." Clicking one of the buttons generates the event which causes the program to do the selected calculation and upda..

  Program produces 1000 integer ranging

Then your program produces 1000 integer ranging from 1to 10000 in the array and then sort them in ascending order and then print the result into data.txt file. (You may list integers separated by space or new line)

  Features of any programming language is recursion

One of the most useful features of any programming language is recursion and control structures, decisions and loops. Recursion and loop structures allow programs to repeat actions without duplicating code.

  Video store application

Prepare an object-oriented program in Java for a video store application with the subsequent

  What is the definition of a run-time error

What is the definition of a run-time error? How are exceptions and exception handling related to run-time errors

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  This is a client server monitoring system project

this is a client server monitoring system project design.first in the server side the 1a program is my own and i have

  App that allows the user to enter a series of numbers

Write an app that allows the user to enter a series of numbers and manipulate them. The app should provide users with the option of adding or multiplying the numbers.

  What is an example of a javascript framework in the

what is an example of a javascript framework? in the framework you have described what is an example of an application

  Create four classes that must all interact

You will create four classes that must all interact in some meaningful way. In order to start you will create a class diagram to determine which classes depend on other classes and what those classes are

  Create a third string consisting of the first half of string

Show the length of both strings - Create a third string consisting of the first half of string (1) and the second half of string.

  An int representing the value stored inside the node

In Java, code a doubly linked, sorted list (in ascending order). Each item of the list will just store an int. You need to code three classes: Nade, SortedList, and GroupProject. The Node class has three instance variables, all private: an int..

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