Take a screenshot of running the code and its output (in this case, employeeData.txt was created in notepad and saved in drive D)

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter9: Working With Text Functions And Creating Custom Formats
Section: Chapter Questions
Problem 2.3CP
icon
Related questions
Question

Take a screenshot of running the code and its output

(in this case, employeeData.txt was created in notepad and saved in drive D)

*employeeData - Notepad
File Edit Format View Help
Emily Johnson 45 15.0
Transcribed Image Text:*employeeData - Notepad File Edit Format View Help Emily Johnson 45 15.0
import java.util.*;
import java.io.*;
public class April26 {
public static void main(String[] args)throws FileNotFoundException {
Scanner inFile= new Scanner(new FileReader("d:\\employeeData.txt")),
String firstName;
String lastName;
double hoursWorked;
double payRate;
double wages;
inFile.next();
lastName = inFile.next();
hoursWorked =inFile.nextDouble();
payRate= inFile.nextDouble();
payRate;
firstName
%3D
wages = hoursWorked *
System.out.println("Name:
System.out. println("No. Hours Worked:
System.out.println("Rate Per Hour:
System.out.println("Salary:
System.out.println(wages);
inFile.close();
+lastName);
+hoursWorked);
+payRate);
+firstName+"
%3D
+wages);
}
|}
Transcribed Image Text:import java.util.*; import java.io.*; public class April26 { public static void main(String[] args)throws FileNotFoundException { Scanner inFile= new Scanner(new FileReader("d:\\employeeData.txt")), String firstName; String lastName; double hoursWorked; double payRate; double wages; inFile.next(); lastName = inFile.next(); hoursWorked =inFile.nextDouble(); payRate= inFile.nextDouble(); payRate; firstName %3D wages = hoursWorked * System.out.println("Name: System.out. println("No. Hours Worked: System.out.println("Rate Per Hour: System.out.println("Salary: System.out.println(wages); inFile.close(); +lastName); +hoursWorked); +payRate); +firstName+" %3D +wages); } |}
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning