Question
Provide a UML diagram for the Employee class, using the table provided on page 3. Discussion on UML diagrams can be found throughout Chapter 6.
Provide a UML diagram for the Employee class, using the table provided on page 3. Discussion on UML diagrams can be found throughout Chapter 6. Be sure to include all of the following:
Member variables and member functions
Access specifiers for all member variables and member functions
Data types for all member variables
Data types for all parameters
Return types for all member functions and constructors
public class Employee
{
// Fields
private String name; // Employee's name
private int idNumber; // ID number
private String department; // Employee's department
private String position; // Job title
public Employee()
{
name = "";
idNumber = 0;
department = "";
position = "";
}
public Employee(String n, int id,
String dept, String pos)
{
name = n;
idNumber = id;
department = dept;
position = pos;
}
public Employee(String n, int id)
{
name = n;
idNumber = id;
department = "";
position = "";
}
public void setName(String n)
{
name = n;
}
public void setIdNumber(int num)
{
idNumber = num;
}
public void setDepartment(String d)
{
department = d;
}
public void setPosition(String p)
{
position = p;
}
public String getName()
{
return name;
}
public int getIdNumber()
{
return idNumber;
}
public String getDepartment()
{
return department;
}
public String getPosition()
{
return position;
}
}
I need a table diagram
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started