0% found this document useful (0 votes)
14 views3 pages

Java Inheritance Exercise for Employees

This document describes a programming exercise in Java about inheritance to manage different categories of employees in a company. It details the characteristics of each professional category and the possible bonuses associated with each one. The program should create an Employee class and subclasses for each category that store employee data in an array. The menu will allow for the creation of employees, querying their data, and entering the necessary information to calculate their bonuses and total salaries.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Java Inheritance Exercise for Employees

This document describes a programming exercise in Java about inheritance to manage different categories of employees in a company. It details the characteristics of each professional category and the possible bonuses associated with each one. The program should create an Employee class and subclasses for each category that store employee data in an array. The menu will allow for the creation of employees, querying their data, and entering the necessary information to calculate their bonuses and total salaries.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EXERCISE ON INHERITANCE

Java Programming

Brief description
Exercises on Java programming

Miguel Otero Alcudia


[Link]@[Link]
Inheritance Exercise: Employees

1. In our company, we want to computerize employee management, for which we are going to
create a program in Java that implements our management system.
In our company, we have several professional categories:
Administrative personnel
Executives
Advertisers
Accountable
Programmers
Systems
HumanResources
Commercials

These categories differ from each other not only in their name but also in each
one has a specific base salary plus certain bonuses according to her
activity.

For each of these categories, we will create an attribute in the specific class that
indicate the level on which the corresponding bonus depends, for example, for seniority
we will create an int seniority that will contain the value of that data.
In all cases, the seniority bonus applies if the seniority attribute is greater.
What 1.
For all employees we must keep:
Name
Surnames
Social Security Number
low days
days of antiquity
years of antiquity
base salary
professional category
Department
numeroEmpleado
base salary

For example, the administrative staff have a seniority bonus and an additional bonus.
productivity (if they have been unsubscribed for more than 1 year).
The executives have the seniority bonus as well as a productivity bonus.
according to the results of your department (we assume that if it is greater
that 50 corresponds to the bonus.
Advertisers will have a seniority bonus and also an additional bonus according to the
increase in sales after developing a campaign (we assume so
if they are over 23, the bonus applies.
Programmers will have an efficiency boost according to the average time of
code incident resolution (if it is less than 30 it is applied).
Employees in the systems area will receive a bonus based on their level.
availability of the systems that manage (if the availability is 70 or
superior.
Human resources will have a bonus based on the number of activities.
carried out by the department (must be greater than 40).
Finally, the category of commercials will have an additional incentive based on the level of sales.
carried out this year.

Create the program in such a way that we create an array of type Employee in which
Let's protect our employees of the company, no matter what type they are.

In our Menu we should have the necessary options to create employees of each type.
consult the data of a specific employee using their employee number.

We assume that the base salary is requested via keyboard when creating the user.

We must also create the options to input productivity data, days of absence.
etc for each attribute that entails a plus.

We should also create a function that shows us the salary without bonuses.

In addition, a function that shows us the salary of an employee including bonuses.

Finally, to facilitate the work of our payroll department, we must show the
total salaries including the corresponding bonuses that we must pay this month.

You might also like