Probably easiest if I just quote,
5) Assignment Entity, A class that models an association between an Employee and a Project Each project usually has several employees working on it at any one time, but there may be none at times. Each employee must work on at least one project, but may work part time on other projects. Each Assignment have their own independent start date and stop date, but the dates must lie within the overall start and stop dates for the projects concerned.
I have my Employee and Project class.
My test class fills out info for both of these classes.
names, project start/end dates ect.
How would I go about making the assignment class?
Apprecaite it.
package test_class;
// will be extended to both consultant and manager
public class Employee {
private String name;
private int age;
private char sex;
private double salary;
private String job_title;
// Accessors and Mutators
// name
public void setName(String nameIn)
{
name = nameIn;
}
public String getName()
{
return name;
}
// age
public void setAge(int ageIn)
{
age = ageIn;
}
public int getAge()
{
return age;
}
// sex
public void setSex(char sexIn)
{
sex = sexIn;
}
public char getSex()
{
return sex;
}
// salary
public void setSalary(double salaryIn)
{
salary = salaryIn;
}
public double getSalary()
{
return salary;
}
// job title
public void setJob_title(String jobIn)
{
job_title = jobIn;
}
public String getJob_title()
{
return job_title;
}
// salary increment
public void increment(double salaryIn) {
salary = salary*1.1;
}
// promotion
public void promote(String jobIn) {
job_title = jobIn;
}
}
package test_class;
public class Project {
// Load variables
private String projectName;
private String projectManager;
private String projectStartDate;
private String projectStopDate;
// Accessors and Mutators
// projectName
public void setProjectName(String projectNameIn)
{
projectName = projectNameIn;
}
public String getProjectName()
{
return projectName;
}
// projectManager
public void setProjectManager(String projectManagerIn)
{
projectManager = projectManagerIn;
}
public String getProjectManager()
{
return projectManager;
}
// projectStartDate
public void setProjectStartDate(String projectStartDateIn)
{
projectStartDate = projectStartDateIn;
}
public String getProjectStartDate()
{
return projectStartDate;
}
// projectStopDate
public void setProjectStopDate(String projectStopDateIn)
{
projectStopDate = projectStopDateIn;
}
public String getProjectStopDate()
{
return projectStopDate;
}
}