All generations.

generate functionTue, 24 Jan 2023

constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on)

public class Employee { private int employeeNumber; private String employeeName; private String employeeAddress; private int employeeAge; private double employeeSalary; // private static int numberOfEmployees = 1; public Employee() { this.employeeNumber = numberOfEmployees++; this.employeeName = ""; this.employeeAddress = ""; this.employeeAge = 0; this.employeeSalary = 0.0; } public Employee(String employeeName, String employeeAddress, int employeeAge, double employeeSalary) { this.employeeNumber = numberOfEmployees++; this.employeeName = employeeName; this.employeeAddress = employeeAddress; this.employeeAge = employeeAge; this.employeeSalary = employeeSalary; }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

enum Departamento { VENTAS, MARKETING, DESARROLLO } enum Puesto { PROGRAMADOR, ANALISTA, JEFE_DE_PROYECTO } class Empleado { // Atributos public static int contadorEmpleados; private int numEmpleado; private String nombre; private int anyoAlta; private Departamento departamento; private double sueldo; private Puesto puesto; // Constructor public Empleado(String nombre, int anyoAlta, Departamento departamento, double sueldo, Puesto puesto) { this.numEmpleado = ++contadorEmpleados; this.nombre = nombre; this.anyoAlta = anyoAlta; this.departamento = departamento; this.sueldo = sue

Java
View
generate functionTue, 24 Jan 2023

A method that indicates how many employees are currently working in the company.

Script function employeeCount(employees) { // employeeCount is a function that takes in an array of people var count = 0; // Inside the function we'll set a variable called count to 0 for (var i = 0; i < employees.length; i++) { // Then we'll loop through the array of employees if (employees[i].isEmployed) { // If the person at the current index of our loop is employed count++; // Add 1 to our count } } // Lastly, return the total number of employees we counted. return count; } employees = [ {name: "Sam", isEmployed: true}, {name: "Sasha", isEmployed: false}, {name: "Derek", isEmployed: true}, {name: "Terri", isEmployed: true}, {name: "Michael", isEmployed: false} ]; employeeCount(employees); // 3

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee { private enum Departamento { Sales, Marketing, Development } private enum Cargo { PROGRAMMER, ANALYST, PROJECT_MANAGER } private static int nextId = 0; private int id; private String nome; private int ano; private Departamento departamento; private Cargo cargo; private double salario; public Employee(String nome, int ano, Departamento departamento, Cargo cargo, double salario){ this.nome = nome; this.ano = ano; this.departamento = departamento; this.cargo = cargo; this.salario = salario; id = ++nextId; } public static void main(String[] args) { Employee employee = new Employee("John", 2019, Departamento.Development, Cargo.PROGRAMMER, 400); System.out.println(employ

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee{ public static void main(String[] args){ System.out.println("Hello, world") } }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee { private int employeeNumber; private String name; private int yearIncorporation; private Department department; private double salary; private Position position; private static int employeeCounter = 1001; public Employee(String name, int yearIncorporation, Department department, double salary, Position position) { this.employeeNumber = employeeCounter++; this.name = name; this.yearIncorporation = yearIncorporation; this.department = department; this.salary = salary; this.position = position; } public int getEmployeeNumber() { return employeeNumber; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getYearIncorporation() { return yearIncorporation; } public void setYearIncorporation(int yearIncorporation) { this.

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee { private int employeeNumber; private String name; private int yearOfIncorporation; private Department department; private float salary; private Position position; private static int counter; public Employee(String name, int yearOfIncorporation, Department department, float salary, Position position) { this.name = name; this.yearOfIncorporation = yearOfIncorporation; this.department = department; this.salary = salary; this.position = position; Employee.counter++; this.employeeNumber = Employee.counter; }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee{ private int number; private String name; private Date year; private Department dept; private double salary; private Position pos; public Employee(String name, Date year, Department dept, double salary, Position pos) { this.name = name; this.year = year; this.dept = dept; this.salary = salary; this.pos = pos; number = 1; } public String toString() { return number + ", " + name + ", " + year + ", " + salary + ", " + pos + ", " + dept; } public boolean equals(Employee e) { return e.number == number && e.name.equals(name) && e.year.equals(year) && e.dept == dept && e.salary == salary && e.pos == pos; } public int getNumber() { return number; } }

Java
View
generate functionTue, 24 Jan 2023

constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on)

public class Employee { private String name; private String jobTitle; private int age; private String phoneNumber; private String email; private String address; private String startDate; private String salary; public Employee(String name, String jobTitle, int age, String phoneNumber, String email, String address, String startDate, String salary) { this.name = name; this.jobTitle = jobTitle; this.age = age; this.phoneNumber = phoneNumber; this.email = email; this.address = address; this.startDate = startDate; this.salary = salary; } }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

import java.util.*; enum Department {SALES, MARKETING, DEVELOPMENT} enum Position {PROGRAMMER, ANALYST, PROJECT_MANAGER} class Employee { private int employeeNumber; private String name; private int incorporationYear; private Department department; private float salary; private Position position; private static int counter; Employee(){ counter++; this.employeeNumber=counter; } public int getEmployeeNumber() { return employeeNumber; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getIncorporationYear() { return incorporationYear; } public void setIncorporationYear(int incorporationYear) { this.incorporationYear = incorporationYear; } public Department getDepartment() { return department; } public void setDepartment(int department)

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee { private int employeeNumber; private String name; private int yearOfIncorporation; private Department department; private float salary; private Position position; private static int count = 0; public Employee(String name, int yearOfIncorporation, Department department, float salary, Position position) { this.name = name; this.yearOfIncorporation = yearOfIncorporation; this.department = department; this.salary = salary; this.position = position; this.employeeNumber = ++count; } public int getEmployeeNumber() { return employeeNumber; } public String getName() { return name; } public int getYearOfIncorporation() { return yearOfIncorporation; } public Department getDepartment() { return department; }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public enum Department { SALES(10), MARKETING(20), DEVELOPMENT(30); private int num; private Department(int num){ this.num = num; } public int getNum() { return num; } } public enum Position { PROGRAMMER(1), ANALYST(2), PROJECT_MANAGER(3); private int num; private Position(int num){ this.num = num; } public int getNum() { return num; } } public class Employee { private String name; private int year; private Department department; private double salary; private Position position; private static int id = 0; private int employeeId; public Employee(String name, int year, Department department, double salary, Position position) { this.name = name; this.year = year; this.department = department; this.salary = salary;

Java
View
generate functionTue, 24 Jan 2023

You want to store information about the employees of a company. For each For each employee we want to store the following information: employee number, name, year of incorporation in the company, name of the department to which The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is prompted for the data, the user will enter 10, 20 or 30 respectively, and the department will be assigned to the department will be assigned to the object using an enum type (research on this data type). From the same way, the available departments are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the office will be assigned to the Employee object using an enum type. The constructor of the class will be all data will be passed to the constructor of the class except the employee number which will be a generated number (the first employee to be employee number 1 will be assigned to the first employee, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public enum Department { SALES(10), MARKETING(20), DEVELOPMENT(30); private final int value; private Department(int value) { this.value = value; } public int getValue() { return value; } } public enum Occupation { PROGRAMMER(1), ANALYST(2), PROJECT_MANAGER(3); private final int value; private Occupation(int value) { this.value = value; } public int getValue() { return value; } } public class Employee { private static int numberOfEmployees = 0; private int number; private String name; private int yearOfIncorporation; private Department department; private double salary; private Occupation occupation; public Employee(String name, int yearOfIncorporation, int dep, double salary, int occ) { this.name = name

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Empleado { private int numero; private String nombre; private int añoDeIngreso; private String departamento; private double salario; private String cargo; public Empleado(String nombre, int añoDeIngreso, String departamento, double salario, String cargo) { numero = (int) Math.random(); this.nombre = nombre; this.añoDeIngreso = añoDeIngreso; this.departamento = departamento; this.salario = salario; this.cargo = cargo; } public int getNumero() { return numero; } public void setNumero(int numero) { this.numero = numero; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

enum Department { SALES, MARKETING, DEVELOPMENT } enum Position { PROGRAMMER, ANALYST, PROJECT_MANAGER } class Employee { int employeeNumber; String name; Date yearOfIncorporation; Department department; double salary; Position position; } class EmployeesContainer { List<Employee> employees; void addEmployee() { ... } }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public enum Departamentos { SALES, MARKETING, DEVELOPMENT; } public enum Posiciones { PROGRAMMER, ANALYST, PROJECT_MANAGER; } public class Empleado { private static int id = 0; private int numero; private String nombre; private int año_contrato; private Departamentos departamento; private int salario; private Posiciones posicion; public Empleado(String nombre, int año_contrato, Departamentos departamento, int salario, Posiciones posicion) { this.numero = id; this.nombre = nombre; this.año_contrato = año_contrato; this.departamento = departamento; this.salario = salario; this.posicion = posicion; id++; } public int getNumero() {

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

package ejercicios; public class Employee { private String name; private String year; private String department; private String salary; private String ocupation; private String id; public Employee(String name, String year, String department, String salary, String ocupation, String id) { super(); this.name = name; this.year = year; this.department = department; this.salary = salary; this.ocupation = ocupation; this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public String getDepartment() { return department; } public

Java
View
generate functionTue, 24 Jan 2023

You want to store information about the employees of a company. For each For each employee we want to store the following information: employee number, name, year of incorporation in the company, name of the department to which The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is prompted for the data, the user will enter 10, 20 or 30 respectively, and the department will be assigned to the department will be assigned to the object using an enum type (research on this data type). From the same way, the available departments are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the office will be assigned to the Employee object using an enum type. The constructor of the class will be all data will be passed to the constructor of the class except the employee number which will be a generated number (the first employee to be employee number 1 will be assigned to the first employee, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public enum Department { DEVELOPMENT, SALES, MARKETING; } public enum Occupation { PROGRAMMER, ANALYST, PROJECT_MANAGER; } public class Employee { private static int id; private String name; private int year; private Department department; private int salary; private Occupation occupation; public Employee(String name, int year, Department department, int salary, Occupation occupation) { id++; this.name = name; this.year = year; this.department = department; this.salary = salary; this.occupation = occupation; } public static int getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getYear() { return year; }

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Employee{ private int number; private String name; private int year; private Departament departament; private double salary; private Position position; public Employee(String name, int year, Departament departament, double salary, Position position){ this.number = Employee.number + 1; this.name = name; this.year = year; this.departament = departament; this.salary = salary; this.position = position; Employee.number += 1; } //getter and setter methods @Override public String toString() { return "Employee{" + "number=" + number + ", name='" + name + '\'' + ", year=" + year + ", departament=" + departament + ", salary=" + salary + ", position=" + position + '}'; } @Override public boolean equals(Object o) { if (this == o) return true

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

package com.company; import javax.swing.*; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); Employee employee = new Employee(); Department department = new Department(); Position position = new Position(); for (int i = 0; i < 5; i++) { System.out.print("Name: "); String name = input.nextLine(); System.out.print("Year of incorporation: "); int incorporation = input.nextInt(); System.out.print("Department: "); int dep = input.nextInt(); department.setDepartment(dep); System.out.print("Salary: "); int salary = input.nextInt(); System.out.print("Position: "); int pos = input.nextInt(); position.setPosition(pos); System.out.println(); employee.setEmployee(name, incorporation, department

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

package Employees; import java.util.Scanner; public class Employee { private int numeroEmpleado; private String nombre; private int añoIngreso; private Departamentos departamento; private int salario; private Puestos trabajo; private static int contadorEmpleados = 0; public Employee(String nombre, int añoIngreso, Departamentos departamento, int salario, Puestos trabajo) { this.numeroEmpleado = ++contadorEmpleados; this.nombre = nombre; this.añoIngreso = añoIngreso; this.departamento = departamento; this.salario = salario; this.trabajo = trabajo; } @Override public String toString() { return "El empleado numero: " + numeroEmpleado + "\nNombre: " +

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

public class Empleado { private int numeroEmpleado; private String nombre; private int antiguedad; private Departamento departamento; private int sueldo; private Puesto puesto; // Constructores public Empleado() { numeroEmpleado = 1; nombre = ""; antiguedad = 0; departamento = Departamento.SALES; sueldo = 0; puesto = Puesto.PROGRAMADOR; } public Empleado(String nombre, int antiguedad, Departamento departamento, int sueldo, Puesto puesto) { numeroEmpleado = 1; this.nombre = nombre; this.antiguedad = antiguedad; this.departamento = departamento; this.sueldo = sueldo; this

Java
View
generate functionSun, 22 Jan 2023

i want to store information about the employees of a company. For each employee i want to store the following information: The employee number, name, year of incorporation in the company, name of the department to which he/she belongs, salary and occupation. The company has only 3 departments: Sales, Marketing and Development. When the user is asked for the data, the user will enter 10, 20 or 30 respectively and the department will be assigned to the department will be assigned to the object using an enum type. From Likewise, the available positions are: PROGRAMMER, ANALYST and PROJECT MANAGER. Without However, when entering the data, the user will enter 1, 2 or 3, respectively, and the trade will be assigned to the the Employee object using an enum type. The constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on). The employee will have a toString method and an equals method.

import java.util.Scanner; public class employee { private int id; private String name; private int years; String department; private int salary; String occupation; enum department{ Sales, Marketing, Development; } enum occupation{ Programmer, Analyst, Project_Manager; } public employee() { } public void getData() { System.out.println("Insert the name of the employee"); Scanner scan = new Scanner(System.in); name = scan.nextLine(); System.out.println("Insert the years of the employee"); years = scan.nextInt(); System.out.println("Insert the department of the employee \n (Sales = 10, Marketing = 20, Development = 30)"); int dp = scan.next

Java
View

Questions about programming?Chat with your personal AI assistant