Menu

[solved]-Use Enum Java Problem 3 Create Class Employee Attributes First Name Last Name Job Title Sa Q39020601

DO NOT USE ENUM JAVA Problem 3: Create a class Employee that hasthe attributes first name, last name, Job title, salary, phonenumber, address, and Employee ID. First name, last name, andaddress are all of type string, salary is of type double, and phonenumber is of type integer. ID must be defined as a separate classcalled EmployeeID. It has an 8-digit number that consists of threeparts. The first digit (left to right) represent the century ofemployment if it was before 2000 then it is 1 else it is 2 then thesecond two digits represent the year of employment. The last 5digits represents a serial number. JobTitle is of type enum, eachtype has job title code (String) and hour wage (double) that isrelated to that code. The types are listed in the following table:Job Title Job Title Code Hour Wage Consultant C 30 ProjectManagerPM 20 Engineer ENG 17.5 Technician TECH 15 Worker W 10 Driver D 10Coordinator CORD 12.5 You should create an application classEmployeeInfo that asks the user to enter the number of employeeshe/she wishes to input/view, create a reference array of typeEmployee, enter employees’ information and then view theinformation of all the employee entered. The job title is enteredas a code. For the salary, the program should ask the user to enterthe number of projects the employee has worked on this month, andthen the number of hours he worked on each of the projects. Theprogram then calculates the salary using the following formula_Salary=i=0nhourly wage*hoursifIqk64AKanoAAAAASUVORK5CYII= Thehourly age is taken from the JobTitle Enumeration type. Sample Run:Enter the number of employees: 3 Employee 1 First Name: AliEmployee 1 Last Name: Mohammed Employee 1 Job Title Code: TECHEmployee 1 Phone Number: 9987010 Employee 1 Address: Kuwait – Block12 Employee 1 Year of Employment: 1998 Employee 1 Number ofprojects: 3 Employee 1 Project 1 hours: 20 Employee 1 Project 2hours: 50 Employee 1 Project 3 hours: 20 Employee 2 First Name:Raef Employee 2 Last Name: Jawad Employee 2 Job Title Code: ENGEmployee 2 Phone Number: 9987111 Employee 2 Address: Meshref –Block 1 Employee 2 Year of Employment: 2000 Employee 2 Number ofprojects: 2 Employee 2 Project 1 hours: 20 Employee 2 Project 2hours: 100 Employee 3 First Name: Mohammed Employee 3 Last Name:Rafiq Employee 3 Job Title Code: D Employee 3 Phone Number:66554643 Employee 3 Address: Meshref – Block 1 Employee 3 Year ofEmployment: 2010 Employee 3 Number of projects: 4 Employee 3Project 1 hours: 20 Employee 3 Project 2 hours: 100 Employee 3Project 3 hours: 10 Employee 3 Project 4 hours: 10 Employees Are:Name 1: Ali Mohammed ID: 19800001 Phone Number: 9987010 Address:Kuwait – Block 12 Job title: Technician Hour wage: 15 Salary: 1350Name 2: Raef Jawad ID: 20000002 Phone Number: 9987111 Address:Meshref – Block 1 Job title: Engineer Hour wage: 17.5 Salary: 2100Name 3: Mohammed Rafiq ID: 21000003 Phone Number: 66554643 Address:Meshref – Block 1 Job title: Driver Hour wage: 10 Salary: 1400

Expert Answer


Answer to DO NOT USE ENUM JAVA Problem 3: Create a class Employee that has the attributes first name, last name, Job title, salary… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *