Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 1 : Program 2 : Reading / Writing multiple data types Read employee names from given file ( employees . txt ) , for

Program 1: Program 2:
Reading / Writing multiple data types
Read employee names from given file (employees.txt), for each employee generate random numbers of:
Hours (0-40)
Rate (0-50)
Calculate Gross Pay (hours * rate)
The output to console looks as follows:
Copy the employees.txt file to your Eclipse workspace. The directory name looks like:
.\yourname\eclipse-workspace\Inputoutput2 Program 1:
Must Compile or Zero points
incorrect results lose 12 points
Do not turn in code that does not compile
Do not turn in code that has not been tested
All variable declarations are at the top and followed by a blank line
All output must be aligned as shown above
All 3 files must have correct data type written to it
Error handling must be done for all file access operations
File name that is being used must printed
Program 2:
Must Compile or Zero points
incorrect results lose 12 points
Do not turn in code that does not compile
Do not turn in code that has not been tested
All variable declarations are at the top and followed by a blank line
All output must be aligned as shown above
Must read and print all names from file
Must calculate Gross Pay correctly for each name in file
Use doubles not floats
All double values are rounded to 2 decimal places
Reading / Writing multiple data types
Write 3 files each with 10 lines of 3 different data types.
Integers
Write a series of 10 random integers to a file "integers.txt"
Read those integers from the file
Doubles
Write a series of 10 random doubles to a file "doubles.txt"
Read those doubles from the file
Strings
Write a series of 10 random strings to a file "strings.txt"
Read those strings from the file
For each of the 3 data types and their specified file:
Open the file for writing
Write 10 lines of the respective data type
Close the file
Open the file for reading
Read all lines from the file and print them to the console
Print the file name that is being opened and closed
Use the following to create a random string:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

OUTCOME 6 Explain and give examples of diversity management.

Answered: 1 week ago