Create a data file named %YourName%_Test1.txt with a header and 500 lines of faculty member data

computer science

Description

Java

Create a data file named %YourName%_Test1.txt  with a header and 500 lines of faculty member data.  Each line in the file should consist of a faculty members first name, last name, rank, and salary.  The faculty member’s first name and last name for the ith line are FirstNamei and LastNamei. The rank is randomly generate as assistant, associate, and full.  The salary is randomly generated as a number with two digits after the decimal point.  The salary for an assistant professor should be in the range from 50,000 to 80,000, for associate professor from 60,000 to 110,000, and for a full professor from 75,000 to 130,000.

Header

Create a header in the first 6 lines of the text file using the following format:

Line 1 : “Test 1 - %Date File Created%”       (Example = Test 1 – March 5, 2015)

Line 2: Blank
Line 3: %Student Name%
Line 4: Blank
Line 5: Absolute path of a file
Line 6: Blank
2 FirstName2 LastName2 Associate 81112.45
Associate = 60,000 to 110,000
Full = 75,000 to 130,000

Faculty Data

Generate 500 lines of faculty data with each line consisting of row number, first name, last name, rank, and salary separated by a space.  Here is an example of what each line of data should look like:

1 FirstName1 LastName1 Assistant 60055.95

      Field Specifications:

First Name = “FirstName” + row number

Last Name = “LastName” + row number

Rank = Randomly generated as either Assistant, Associate, or Full

Salary = Randomly generated as a number with two digits after the decimal meeting the following ranges for each rank

Assistant = 50,000 to 80,000


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.