Write a loop that for each employee

Assignment Help JAVA Programming
Reference no: EM131589071

The following tasks are to done in the indicated classes:

Task #0 - (in the SalariedEmployeeclass and the HourlyEmployee class)
• Fix the error due to extending the Employee superclass
o Note: the method for HourlyEmployee needs to get hours to compute weekly pay.
• Create the toString() method

Task #1 - Define an arrayList, myEmployees, of Employee type (in the EmployeeDemo class)

Task #2: (in the EmployeeDemo class)
Add a try-catch block to handle FileNotFound& any general Exception
Add a finally clause, but check that the file was created before closing it

Task #3: (in the EmployeeDemo class)
Open the input file, stored in the project's directory
Use a try-catch-finally block to handle the fileNotFound condition

Within the try-catch block:
read the salaryEmp.txt file until the end of the file
(firstName, lastName, annualSalary)
for each record read, create a SalariedEmployee object, and put inside arrayList of myEmployees

read the hourlyEmp.txt file until the end of the file
for each record read, create an HourlyEmployeeobject, and put inside myEmployeesarrayList
(firstName, lastName, wage)

Task #4:(in the EmployeeDemo class)
Write a loop that, for each employee, will polymorphically display the employee's data, ask the user for any missing data (hours), and thenpolymorphically calculate weeklyPay and display the pay.

Attachment:- PracticeMid.zip

Reference no: EM131589071

Questions Cloud

What is the project npv : Question - The ABD Company is considering buying a new machine for one of its factories, what is the project's NPV
Improve a current account deficit : 1. Expenditure-switching policies designed to improve a current account deficit
Review the case related to the watergate scandal : In this exercise you are to write a short paper (1-2 pages) analyzing the following National Geographic Channel expose on the Watergate scandal.
Prepare a statement of cash flows for central ltd : The balance sheets of Central Limited for the years ended 31/12/2006 and 31/12/2007 are presented, Prepare a statement of cash flows for Central Ltd.
Write a loop that for each employee : Define an arrayList, myEmployees, of Employee type - Within the try-catch block - Write a loop that, for each employee
Concept and components of business cycles : In an essay, explain the concept and components of business cycles, and identify some of the factors that contribute to the expansion and contraction.
What would you want your friend who found out out to do : If you were the person cheating on his or her spouse, what would you want your friend who found out to do to you, and why?
What percentage of schools require work experience : What percentage of schools require work experience? From this percentage, does this appear to be a significant factor in gaining admissions?
Price level affects the real value of money : Consider how to explain how an increase in the price level affects the real value of money.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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