CITP 4350 Assignment 5 Create an Employee class with five fields: first name, last name, workID, yearStartedWked, and initSalary. It includes constructor(s) and properties to initialize values for all...

1 answer below »
Attached are the files needed to complete the assignment. Thank you guys!


CITP 4350 Assignment 5 Create an Employee class with five fields: first name, last name, workID, yearStartedWked, and initSalary. It includes constructor(s) and properties to initialize values for all fields. Create an interface, SalaryCalculate, class that includes two functions: first,CalcYearWorked() function, it takes one parameter (currentyear) and calculates the number of year the worker has been working. The second function, CalcCurSalary() function that calculates the current year salary. Create a Worker classes that is derived from Employee and SalaryCalculate class. · In Worker class, it includes two field, nYearWked and curSalary, and constructor(s). It defines the CalcYearWorked() function using (current year – yearStartedWked) and save it in the nYearWked variable. It also defines the CalcCurSalary() function that calculates the current year salary by using initial salary with 3% yearly increment. Create a Manager class that is derived from Worker class. · In Manager class, it includes one field: yearPromo and constructor(s). Itincludes a CalcCurSalary function that calculate the current year salary by overriding the base class function using initial salary with 5% yearly increment plus 10% bonus. The manager’s salary calculates in two parts. It calculates as a worker before the year promoted and as a manager after the promotion. Write an application that reads the workers and managers information from files (“worker.txt” and “manager.txt”) and then creates the dynamic arrays of objects. Prompt the user for current year and display the workers’ and managers’ current information in separate groups: first and last name, ID, the year he/she has been working, and current salary. 3 Sam Reza M000411 1995 51000 2005 Jose Perez M000412 1998 55000 2002 Rachel Pena M000413 2000 48000 2010 5 Hector Alcoser A001231 1999 24000 Anna Alaniz A001232 2001 34000 Lydia Bean A001233 2002 30000 Jorge Botello A001234 2005 40000 Pablo Gonzalez A001235 2007 35000
Answered Same DayOct 08, 2021

Answer To: CITP 4350 Assignment 5 Create an Employee class with five fields: first name, last name, workID,...

Arun Shankar answered on Oct 11 2021
146 Votes
using System;
/*
Write an application that reads the workers and managers information from files (
“worker.txt” and “manager.txt”) and then creates the dynamic arrays of objects. Prompt the user for current year and display the workers’ and managers’ current information in separate groups: first and last name, ID, the year he/she has been working, and current salary.*/
class Employee
{
private String firstName;
private String lastName;
private String workID;
private int yearStartedWked;
private double initSalary;
// Constructor of the Employee class
Employee(String _firstName, String _lastName, String _workID, int _yearStartedWked, double _initSalary)
{
firstName = _firstName;
lastName = _lastName;
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here