- import java.util.Scanner;
- import java.io.File;
- import java.io.IOException;
- public class DoPayroll {
- public static void main(String args[])
- throws IOException {
- Scanner diskScanner =
- new Scanner(new File("EmployeeInfo.txt"));
- for (int empNum = 1; empNum <= 3; empNum++) {
- payOneEmployee(diskScanner);
- }
- diskScanner.close();
- }
- static void payOneEmployee(Scanner aScanner) {
- Employee anEmployee = new Employee();
- anEmployee.setName(aScanner.nextLine());
- anEmployee.setJobTitle(aScanner.nextLine());
- anEmployee.cutCheck(aScanner.nextDouble());
- aScanner.nextLine();
- }
- }
[text] Google
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: