Please create a UML for a class called Employee
It will have a lastName as a String
It will have a salary as a double
It will have vacDays as an int
It will have a no argument constructor that sets lastName to null, salary to 0.0 and vacation days to 15
It will have an argument constructor.
It will have 3 accessor and 3 mutator methods
It will have a showInfo() as a void method to display all the fields
JAVA
/**
* The Class Employee.
*/
public class Employee {
/** The last name. */
private String lastName;
/** The salary. */
private double salary;
/** The vac days. */
private int vacDays;
public Employee(String aLastName, double aSalary, int
aVacDays) {
super();
lastName = aLastName;
salary = aSalary;
vacDays = aVacDays;
}
public Employee() {
lastName=null;
salary=0;
vacDays=15;
}
/**
* Gets the last name.
*
* @return the last name
*/
public String getLastName() {
return lastName;
}
/**
* Gets the salary.
*
* @return the salary
*/
public double getSalary() {
return salary;
}
/**
* Gets the vac days.
*
* @return the vac days
*/
public int getVacDays() {
return vacDays;
}
/**
* Sets the last name.
*
* @param aLastName the new last name
*/
public void setLastName(String aLastName) {
lastName = aLastName;
}
/**
* Sets the salary.
*
* @param aSalary the new salary
*/
public void setSalary(double aSalary) {
salary = aSalary;
}
/**
* Sets the vac days.
*
* @param aVacDays the new vac days
*/
public void setVacDays(int aVacDays) {
vacDays = aVacDays;
}
public void showInfo() {
System.out.println("LastName: " +
lastName + "\nSalary: " + salary + "\nVacDays: " + vacDays);
}
}

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Please create a UML for a class called Employee It will have a lastName as a...
Code should be in C# Create a class called SavingsAccount. Use a static variable called annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12 – this interest should be added to savingsBalance. Provide static method setAnnualInterestRate to set the annualInterestRate to a new value....
What this Lab Is About: Given a UML diagram, learn to design a class Learn how to define constructor, accessor, mutator and toStringOmethods, etc Learn how to create an object and call an instance method. Coding Guidelines for All ments You will be graded on this Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc) Keep identifiers to a reasonably short length. Use upper case for constants. Use title case (first letter is u case)...
Java Program Please help me with this. It should be pretty basic and easy but I am struggling with it. Thank you Create a superclass called VacationInstance Variables destination - String budget - double Constructors - default and parameterized to set all instance variables Access and mutator methods budgetBalance method - returns the amount the vacation is under or over budget. Under budget is a positive number and over budget is a negative number. This method will be overwritten in...
Java
Problem 2: Employee (10 points) (Software Design) Create an abstract class that represents an Employee and contains abstract method payment. Create concrete classes: SalaryEmployee, CommissionEmployee, HourlyEmployee which extend the Employee class and implements that abstract method. A Salary Employee has a salary, a Commision Employee has a commission rate and total sales, and Hourly Employee as an hourly rate and hours worked Software Architecture: The Employee class is the abstract super class and must be instantiated by one of...
Draw the UML DIAGRAM ALSO
PLEASE DRAW THE UML DIAGRAM.ALSO
in java
should use the program in java
For this task you will create a Point3D class to represent a point that has coordinates in three dimensions labeled x, y and z. You will then use the class to perform some calculations on an array of these points. You need to draw a UML diagram for the class (Point3D) and then implement the class The Point3D class will have the...
Create a class House with the private fields: numberOfUnits of the type int, yearBuilt of the type int, assessedPrice of the type double. A constructor for this class should have three arguments for initializing these fields. Add accessors and mutators for all fields except a mutator for yearBuilt, and the method toString. Create a class StreetHouse which extends House and has additional fields: streetNumber of the type int, homeowner of the type String, and two neighbors: leftNeighbor and rightNeighbor, both...
Using your Dog class from earlier this week, complete the following: Create a new class called DogKennel with the following: Instance field(s) - array of Dogs + any others you may want Contructor - default (no parameters) - will make a DogKennel with no dogs in it Methods: public void addDog(Dog d) - which adds a dog to the array public int currentNumDogs() - returns number of dogs currently in kennel public double averageAge() - which returns the average age...
Java: Create a class called Vehicle with the following features: a. It has three private data members (instance variables): one is the manufacturer’s name (String manufacturer), the second is the number of cylinders in the engine (int cylinder), and the third is the owner (Person owner). The class Person is described above. b. It has three constructors, a no-argument constructor, a constructor with three parameters, and a copy constructor. The no-argument constructor will set the manufacturer to “None”, cylinder to...