Answered Essay: This is an Employee Information system, intended for the use of the manager or other administrative personal to store, edit, and re-acc

Program Description:

This is an Employee Information system, intended for the use of the manager or other administrative personal to store, edit, and re-access their Employees’ information.  Simple budget and salary calculations will also be implemented.  The following detailed program description contains the minimum program requirements.  Students are encouraged to add more features (classes, Methods, etc…) after creating the initial classes and methods.

Implementation Requirements:

This program will include the fundamentals of object-oriented programing and all of the requirements for the final project, including:

Arrays or ArrayLists of objects

Static variables and methods

I need help. please can some write this code.

Method overriding (of the toString())

Composition

Inheritance

Random number generation

The storing, editing, and deleting of data using objects

String methods

Class Descriptions

Class Name: EmployeeClient

Class Description: Create a client class which displays the capabilities of the program.  Creativity is encouraged.  However, it MUST include the following:

Main should contain a loop, presenting a list of options at the start of each iteration.

Using an array or ArrayList, allow the user to add and delete Employees from the list.

Allow the user to search through the system for specific Employees.  If the Employee is found, print their corresponding information.

GUI or console may be used.

Class Name: BasicInfo

Class Description:  This class will have instance variables to store each Employee’s:

first name

last name

ID

the specific department they each work for

phone number

address

email address

position title

Include set and get methods for each variable.  Include a toString() method which returns a formatted string of an Employee’s data from this class.

Class Name: GenerateID

Class Description: This class will have instance variables for each Employee’s:

Employee ID

position number

department

Variable department should be of type BasicInfo (Composition).  Each Employee ID should be a randomly generated 4 digit number.  Each position number should be a randomly generated 4 digit number, concatenated to the back of the abbreviation for the department (for example, if the department is Math, the position number should begin with the prefix MA, if English, then ENG, etc).

Include the appropriate methods for each instance variable.  Include a toString() method which returns a formatted string notifying the user that a new Employee’s Employee ID and position number have been generated, and display this data.

Class Name: HoursAndSalary

Class Description: this class will allow the administrator to edit:

The salary for the Employees.  Note: all Employees receive the same salary.

The budget

The sum of the hours worked each week.

Include code to verify that the salary is above minimum wage, and that the budget and sum of hours are positive number.

Class Name: SalaryCalc

Class Description: this class is a subclass of HoursAndSalary (Inheritance). The variables and methods of this class are largely up to the programmer.  However, it is strongly suggested that they be in some way pertaining to salary or budget.  This class will:

Calculate the budget deficit or surplus.

Contain at least three instance variables and their corresponding methods.

Expert Answer

 

import java.util.ArrayList;
import java.util.Scanner;

public class EmployeeClientoperations {
ArrayList<BasicInfo> al = new ArrayList<BasicInfo>();

public void addEmployee(BasicInfo p) {
al.add(p);
}

public void deleteEmployee(int id) {
if (al.size() > 0) {
for (int i = 0; i < al.size(); i++) {
if (al.get(i).getId() == id) {
al.remove(i);
}

}
}
}

public BasicInfo searchEmployee(int id) throws Exception {
if (al.size() > 0) {
for (int i = 0; i < al.size(); i++) {
if (al.get(i).getId() == id) {
return al.get(i);
}
else
{
throw new Exception(“The Id is not found”);
}

}

}
return null;

}

public ArrayList<BasicInfo> displayEmployeeList() {
return al;
}
}

class HoursAndSalary
{
float salary;
int des;
HoursAndSalary ()
{
System.out.println(“Enter Designation:”);
des = get.nextInt();
System.out.println(“Enter Salary:”);
salary = get.nextFloat();
}
void display()
{
System.out.println(“==============================”+”n”+”Full Time BasicInfo Details”+”n”+”==============================”+”n”);
super.display();
System.out.println(“Salary: “+salary);
System.out.println(“Designation: “+des);
}
}

class SalaryCalc extends HoursAndSalary
{
int workinghrs, rate;
SalaryCalc ()
{
System.out.println(“Enter Number of Working Hours:”);
workinghrs = get.nextInt();
}
void SalaryCalculation()
{
rate = 8 * workinghrs;
}

void display()
{
System.out.println(“==============================”+”n”+”Part Time BasicInfo Details”+”n”+”==============================”+”n”);
super.display();
System.out.println(“Number of Working Hours: “+workinghrs);
System.out.println(“Salary for “+workinghrs+” working hours is: $”+rate);
}
}
class EmployeeClient {
public static void main(String args[]) throws Exception {

EmployeeClientoperations pm = new EmployeeClientoperations();
int choice;
do {
Scanner sc = new Scanner(System.in);
System.out.println(“enter choice:”);
choice = sc.nextInt();
switch (choice) {
case 1:
System.out.println(“add employeedetails:”);
System.out.println(“enter id:”);
int id = sc.nextInt();
System.out.println(“enter firstname:”);
String firstname = sc.next();
System.out.println(“enter lastname:”);
String lastname = sc.next();
System.out.println(“enter address:”);
String address = sc.next();
System.out.println(“enter emailAddress:”);
String emailAddress = sc.next();
System.out.println(“enter postiontitle:”);
String postiontitle = sc.next();
System.out.println(“Enter phonenumber:”);
int phonenumber = sc.nextInt();

pm.addEmployee(newEmployee(id,firstname,lastname,address,emailAddress,postiontitle,phonenumber));
break;
case 2:
System.out.println(“Searchemployee:”);
System.out.println(“enter Employee id:”);
id = sc.nextInt();
Employee p = pm.searchEmployee(id);
System.out.println(p.toString());
break;
case 3:
System.out.println(“delete Employee:”);
System.out.println(“enter Employee id:”);
id = sc.nextInt();
pm.deleteEmployee(id);
break;
case 4:
System.out.println(“Display Employees:”);
ArrayList<BasicInfo> al = pm.displayEmployeeList();
if (al.size() > 0) {
for (BasicInfo p1 : al) {
System.out.println(p1.toString());

}
} else {
System.out.println(“no Employees available”);
}

break;
default:
System.out.println(“invalid choice”);
}
} while (choice > 0);

}
System.out.println(“================================”+”n”+”Enter Full Time BasicInfo Details”+”n”+”================================”+”n”);
HoursAndSalary ob1 = new HoursAndSalary();
SalaryCalc   ob = new SalaryCalc ();
System.out.println(“================================”+”n”+”Enter Part Time BasicInfo Details”+”n”+”================================”+”n”);
ob.SalaryCalculation();

}
}

class BasicInfo {
private int id;
private String firstname;
private String lastname;
private String address;
private String emailAddress;
private String postiontitle;
private String Departname;
private int phonenumber;

public BasicInfo(int id, String firstname, String lastname, String address, String emailAddress,
String postiontitle, String departname, int phonenumber) {
super();
GenerateID random ;
ID=random.GenerateID();
this.firstname = firstname;
this.lastname = lastname;
this.address = address;
this.emailAddress = emailAddress;
this.postiontitle = postiontitle;
Departname = departname;
this.phonenumber = phonenumber;
}

public String getFirstname() {
return firstname;
}

public void setFirstname(String firstname) {
this.firstname = firstname;
}

public String getLastname() {
return lastname;
}

public void setLastname(String lastname) {
this.lastname = lastname;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}

public String getEmailAddress() {
return emailAddress;
}

public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}

public int getPhonenumber() {
return phonenumber;
}

public void setPhonenumber(int phonenumber) {
this.phonenumber = phonenumber;
}

public int getId() {
return id;
}

public String getfirstname() {
return firstname;
}

public void setfirstname(String firstname) {
this.firstname = firstname;
}

public int getphonenumber() {
return phonenumber;
}

public void setphonenumber(int phonenumber) {
this.phonenumber = phonenumber;
}

public void setId(int id) {
this.id = id;
}

@Override
public String toString() {
return “BasicInfo [id=” + id + “, firstname=” + firstname + “, lastname=” + lastname + “, address=”
+ address + “, emailAddress=” + emailAddress + “, postiontitle=” + postiontitle
+ “, Departname=” + Departname + “, phonenumber=” + phonenumber + “]”;
}
}

class GenerateID
{
System.out.println(“***** Generating Random Number of 4 digit *****”);
for(int i=0;i<100;i++){
long fraction = (long)(1000 * random.nextDouble());
int id= (int)(fraction + 1000);
System.out.println(id);
}
}

Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?