SlideShare a Scribd company logo
1 of 14
Download to read offline
You will need to develop a system that can track employee information for two Organizations
(such as Google and Microsoft). The Employee information you must track is as follows:
Name
Gender
Job Title
Organization they work for
Birthday
As for the Organization that the Employee works for, you must also track this information:
Organization Name
Number of Employees
The system must be able to properly compare any two employees against each other to determine
if they are the same Employee. This means that if you compared two Employees with the same
Name, Gender, Birthday and Organization, the system should think that they are equal to one
another. If any of these properties are different, then the two Employees are not the same
Employee.
The same rules apply to comparing Organizations to one another. Organizations with the same
Organization name are to be thought of as equal, different names means different organizations.
Use the charts on the next page to create your classes.
Employee
private String name;
private String gender;
private String jobTitle;
private Organization organization;
private String birthDate;
Employee(String theName, String theGender,
String title, Organization org,
String theBirthDate)
<>
String getName()
String getGender()
String getJobTitle()
Organization getOrganization()
String getBirthDate()
String toString()
boolean equals(Employee other)
<>
void changeJobTitle (String newTitle)
void changeName(String newName)
void changeOrganization(Organization org)
Organization
private String organizationName;
private int numEmployees;
Organization(String name, int employees)
<>
String getOrganizationName()
int getNumEmployees()
String toString()
boolean equals(Organization other)
<>
void changeOrganizationName(String newName)
*****NOTE: All constructors and methods should be public. *****
*Note: There is a zip file listed that has a starts for each of the classes that are required. They are
located in the source file and you will also find a test file for the program.
STARTER CODE - EMPLOYEE
public class Employee
{
}
STARTER CODE - ORGANIZATION
/**
* Organization.java
*
* @author - Jane Doe
* @author - Period n
* @author - Id nnnnnnn
*
* @author - I received help from ...
*
*/
public class Organization
{
}
TESTER CODE
/**
* This class tests the Employee and Organization classes.
*/
public class Tester
{
public static void main(String[] args)
{
Employee emp1 = new Employee("Sally Brown", "Female", "Vice President",
new Organization("Google", 5500), "11-11-1969");
System.out.println(emp1);
System.out.println();
System.out.println("Name should be Sally Brown and is " + emp1.getName());
System.out.println("Gender should be Female and is " + emp1.getGender());
System.out.println("Job title should be Vice President and is " + emp1.getJobTitle());
System.out.println("Birth date should be 11-11-1969 and is " + emp1.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp1.getOrganization().getOrganizationName());
System.out.println("Number of employees in organization should be 5500 and is "
+ emp1.getOrganization().getNumEmployees());
System.out.println();
Employee emp2 = new Employee("Sally Brown", "Female", "Vice President",
new Organization("Google", 5500), "11-11-1969");
System.out.println(emp2);
System.out.println();
System.out.println("Name should be Sally Brown and is " + emp2.getName());
System.out.println("Gender should be Female and is " + emp2.getGender());
System.out.println("Job title should be Vice President and is " + emp2.getJobTitle());
System.out.println("Birth date should be 11-11-1969 and is " + emp2.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp2.getOrganization().getOrganizationName());
System.out.println("Number of employees in organization should be 5500 and is "
+ emp2.getOrganization().getNumEmployees());
System.out.println();
Employee emp3 = new Employee("Charlie Brown", "Male", "President",
new Organization("Microsoft", 15500), "9-15-1965");
System.out.println(emp3);
System.out.println();
System.out.println("Name should be Charlie Brown and is " + emp3.getName());
System.out.println("Gender should be Male and is " + emp3.getGender());
System.out.println("Job title should be President and is " + emp3.getJobTitle());
System.out.println("Birth date should be 9-14-1965 and is " + emp3.getBirthDate());
System.out.println("Organization should be Microsoft and is "
+ emp3.getOrganization().getOrganizationName());
System.out.println("Number of employees in organization should be 15500 and is "
+ emp3.getOrganization().getNumEmployees());
System.out.println();
Employee emp4 = new Employee("Charlie Brown", "Male", "President",
new Organization("Google", 5500), "9-15-1965");
System.out.println(emp4);
System.out.println();
System.out.println("Name should be Charlie Brown and is " + emp4.getName());
System.out.println("Gender should be Male and is " + emp4.getGender());
System.out.println("Job title should be President and is " + emp4.getJobTitle());
System.out.println("Birth date should be 9-14-1965 and is " + emp4.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp4.getOrganization().getOrganizationName());
System.out.println("Number of employees in organization should be 5500 and is "
+ emp4.getOrganization().getNumEmployees());
System.out.println();
System.out.println("emp1.equals(emp2) should be true and is " + emp1.equals(emp2));
System.out.println("emp1.equals(emp3) should be false and is " + emp1.equals(emp3));
System.out.println("emp1.equals(emp4) should be false and is " + emp1.equals(emp4));
System.out.println("emp2.equals(emp3) should be false and is " + emp2.equals(emp3));
System.out.println("emp2.equals(emp4) should be false and is " + emp2.equals(emp4));
System.out.println("emp3.equals(emp4) should be false and is " + emp3.equals(emp4));
}
}
Employee
private String name;
private String gender;
private String jobTitle;
private Organization organization;
private String birthDate;
Employee(String theName, String theGender,
String title, Organization org,
String theBirthDate)
<>
String getName()
String getGender()
String getJobTitle()
Organization getOrganization()
String getBirthDate()
String toString()
boolean equals(Employee other)
<>
void changeJobTitle (String newTitle)
void changeName(String newName)
void changeOrganization(Organization org)
Solution
public class Employee {
private String name;
private String gender;
private String jobTitle;
private Organization organization;
private String birthDate;
/**
* @param name
* @param gender
* @param jobTitle
* @param organization
* @param birthDate
*/
public Employee(String name, String gender, String jobTitle,
Organization organization, String birthDate) {
this.name = name;
this.gender = gender;
this.jobTitle = jobTitle;
this.organization = organization;
this.birthDate = birthDate;
}
public String getName() {
return name;
}
public String getGender() {
return gender;
}
public String getJobTitle() {
return jobTitle;
}
public Organization getOrganization() {
return organization;
}
public String getBirthDate() {
return birthDate;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "Employee [name=" + name + ", gender=" + gender + ", jobTitle="
+ jobTitle + ", organization=" + organization + ", birthDate="
+ birthDate + "]";
}
public void changeJobTitle(String newTitle) {
this.jobTitle = newTitle;
}
public void changeName(String newName) {
this.name = newName;
}
public void changeOrganization(Organization org) {
this.organization = org;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((birthDate == null) ? 0 : birthDate.hashCode());
result = prime * result + ((gender == null) ? 0 : gender.hashCode());
result = prime * result
+ ((jobTitle == null) ? 0 : jobTitle.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result
+ ((organization == null) ? 0 : organization.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof Employee))
return false;
Employee other = (Employee) obj;
if (birthDate == null) {
if (other.birthDate != null)
return false;
} else if (!birthDate.equals(other.birthDate))
return false;
if (gender == null) {
if (other.gender != null)
return false;
} else if (!gender.equals(other.gender))
return false;
if (jobTitle == null) {
if (other.jobTitle != null)
return false;
} else if (!jobTitle.equals(other.jobTitle))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (organization == null) {
if (other.organization != null)
return false;
} else if (!organization.equals(other.organization))
return false;
return true;
}
}
public class Organization {
private String organizationName;
private int numEmployees;
/**
* @param organizationName
* @param numEmployees
*/
public Organization(String organizationName, int numEmployees) {
this.organizationName = organizationName;
this.numEmployees = numEmployees;
}
public String getOrganizationName() {
return organizationName;
}
public int getNumEmployees() {
return numEmployees;
}
public void changeOrganizationName(String newName) {
this.organizationName = newName;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + numEmployees;
result = prime
* result
+ ((organizationName == null) ? 0 : organizationName.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof Organization))
return false;
Organization other = (Organization) obj;
if (numEmployees != other.numEmployees)
return false;
if (organizationName == null) {
if (other.organizationName != null)
return false;
} else if (!organizationName.equals(other.organizationName))
return false;
return true;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "Organization [organizationName=" + organizationName
+ ", numEmployees=" + numEmployees + "]";
}
}
public class Tester {
public static void main(String[] args) {
Employee emp1 = new Employee("Sally Brown", "Female", "Vice President",
new Organization("Google", 5500), "11-11-1969");
System.out.println(emp1);
System.out.println();
System.out.println("Name should be Sally Brown and is "
+ emp1.getName());
System.out
.println("Gender should be Female and is " + emp1.getGender());
System.out.println("Job title should be Vice President and is "
+ emp1.getJobTitle());
System.out.println("Birth date should be 11-11-1969 and is "
+ emp1.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp1.getOrganization().getOrganizationName());
System.out
.println("Number of employees in organization should be 5500 and is "
+ emp1.getOrganization().getNumEmployees());
System.out.println();
Employee emp2 = new Employee("Sally Brown", "Female", "Vice President",
new Organization("Google", 5500), "11-11-1969");
System.out.println(emp2);
System.out.println();
System.out.println("Name should be Sally Brown and is "
+ emp2.getName());
System.out
.println("Gender should be Female and is " + emp2.getGender());
System.out.println("Job title should be Vice President and is "
+ emp2.getJobTitle());
System.out.println("Birth date should be 11-11-1969 and is "
+ emp2.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp2.getOrganization().getOrganizationName());
System.out
.println("Number of employees in organization should be 5500 and is "
+ emp2.getOrganization().getNumEmployees());
System.out.println();
Employee emp3 = new Employee("Charlie Brown", "Male", "President",
new Organization("Microsoft", 15500), "9-15-1965");
System.out.println(emp3);
System.out.println();
System.out.println("Name should be Charlie Brown and is "
+ emp3.getName());
System.out.println("Gender should be Male and is " + emp3.getGender());
System.out.println("Job title should be President and is "
+ emp3.getJobTitle());
System.out.println("Birth date should be 9-14-1965 and is "
+ emp3.getBirthDate());
System.out.println("Organization should be Microsoft and is "
+ emp3.getOrganization().getOrganizationName());
System.out
.println("Number of employees in organization should be 15500 and is "
+ emp3.getOrganization().getNumEmployees());
System.out.println();
Employee emp4 = new Employee("Charlie Brown", "Male", "President",
new Organization("Google", 5500), "9-15-1965");
System.out.println(emp4);
System.out.println();
System.out.println("Name should be Charlie Brown and is "
+ emp4.getName());
System.out.println("Gender should be Male and is " + emp4.getGender());
System.out.println("Job title should be President and is "
+ emp4.getJobTitle());
System.out.println("Birth date should be 9-14-1965 and is "
+ emp4.getBirthDate());
System.out.println("Organization should be Google and is "
+ emp4.getOrganization().getOrganizationName());
System.out
.println("Number of employees in organization should be 5500 and is "
+ emp4.getOrganization().getNumEmployees());
System.out.println();
System.out.println("emp1.equals(emp2) should be true and is "
+ emp1.equals(emp2));
System.out.println("emp1.equals(emp3) should be false and is "
+ emp1.equals(emp3));
System.out.println("emp1.equals(emp4) should be false and is "
+ emp1.equals(emp4));
System.out.println("emp2.equals(emp3) should be false and is "
+ emp2.equals(emp3));
System.out.println("emp2.equals(emp4) should be false and is "
+ emp2.equals(emp4));
System.out.println("emp3.equals(emp4) should be false and is "
+ emp3.equals(emp4));
}
}
OUTPUT:
Employee [name=Sally Brown, gender=Female, jobTitle=Vice President,
organization=Organization [organizationName=Google, numEmployees=5500],
birthDate=11-11-1969]
Name should be Sally Brown and is Sally Brown
Gender should be Female and is Female
Job title should be Vice President and is Vice President
Birth date should be 11-11-1969 and is 11-11-1969
Organization should be Google and is Google
Number of employees in organization should be 5500 and is 5500
Employee [name=Sally Brown, gender=Female, jobTitle=Vice President,
organization=Organization [organizationName=Google, numEmployees=5500],
birthDate=11-11-1969]
Name should be Sally Brown and is Sally Brown
Gender should be Female and is Female
Job title should be Vice President and is Vice President
Birth date should be 11-11-1969 and is 11-11-1969
Organization should be Google and is Google
Number of employees in organization should be 5500 and is 5500
Employee [name=Charlie Brown, gender=Male, jobTitle=President, organization=Organization
[organizationName=Microsoft, numEmployees=15500], birthDate=9-15-1965]
Name should be Charlie Brown and is Charlie Brown
Gender should be Male and is Male
Job title should be President and is President
Birth date should be 9-14-1965 and is 9-15-1965
Organization should be Microsoft and is Microsoft
Number of employees in organization should be 15500 and is 15500
Employee [name=Charlie Brown, gender=Male, jobTitle=President, organization=Organization
[organizationName=Google, numEmployees=5500], birthDate=9-15-1965]
Name should be Charlie Brown and is Charlie Brown
Gender should be Male and is Male
Job title should be President and is President
Birth date should be 9-14-1965 and is 9-15-1965
Organization should be Google and is Google
Number of employees in organization should be 5500 and is 5500
emp1.equals(emp2) should be true and is true
emp1.equals(emp3) should be false and is false
emp1.equals(emp4) should be false and is false
emp2.equals(emp3) should be false and is false
emp2.equals(emp4) should be false and is false
emp3.equals(emp4) should be false and is false

More Related Content

Similar to You will need to develop a system that can track employee informatio.pdf

package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdf
nipuns1983
 
Not sure why my program wont run.Programmer S.Villegas helper N.pdf
Not sure why my program wont run.Programmer S.Villegas helper N.pdfNot sure why my program wont run.Programmer S.Villegas helper N.pdf
Not sure why my program wont run.Programmer S.Villegas helper N.pdf
wasemanivytreenrco51
 
CSE 110 - Lab 6 What this Lab Is About  Working wi.docx
CSE 110 - Lab 6 What this Lab Is About  Working wi.docxCSE 110 - Lab 6 What this Lab Is About  Working wi.docx
CSE 110 - Lab 6 What this Lab Is About  Working wi.docx
faithxdunce63732
 
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
alliedscorporation
 
Team public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdfTeam public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdf
DEEPAKSONI562
 
So Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdfSo Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdf
arihantgiftgallery
 
In your Person classAdd a constant field to store the current yea.pdf
In your Person classAdd a constant field to store the current yea.pdfIn your Person classAdd a constant field to store the current yea.pdf
In your Person classAdd a constant field to store the current yea.pdf
arihanthtextiles
 
Overview You are tasked with writing a program called Social Security.pdf
Overview You are tasked with writing a program called Social Security.pdfOverview You are tasked with writing a program called Social Security.pdf
Overview You are tasked with writing a program called Social Security.pdf
info961251
 
Java Question---------------------------FacebookApp(Main).jav.pdf
Java Question---------------------------FacebookApp(Main).jav.pdfJava Question---------------------------FacebookApp(Main).jav.pdf
Java Question---------------------------FacebookApp(Main).jav.pdf
ambersushil
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry university
lhkslkdh89009
 
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdfThis is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
jillisacebi75827
 
Refer to my progress on this assignment belowIn this problem you w.pdf
Refer to my progress on this assignment belowIn this problem you w.pdfRefer to my progress on this assignment belowIn this problem you w.pdf
Refer to my progress on this assignment belowIn this problem you w.pdf
arishmarketing21
 
Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7
helpido9
 
package employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdfpackage employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdf
sharnapiyush773
 
1. Section1.- Populating the list of persons on the person listing f.pdf
1. Section1.- Populating the list of persons on the person listing f.pdf1. Section1.- Populating the list of persons on the person listing f.pdf
1. Section1.- Populating the list of persons on the person listing f.pdf
aniljain719651
 

Similar to You will need to develop a system that can track employee informatio.pdf (20)

Basic Object Oriented Concepts
Basic Object Oriented ConceptsBasic Object Oriented Concepts
Basic Object Oriented Concepts
 
package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdf
 
Not sure why my program wont run.Programmer S.Villegas helper N.pdf
Not sure why my program wont run.Programmer S.Villegas helper N.pdfNot sure why my program wont run.Programmer S.Villegas helper N.pdf
Not sure why my program wont run.Programmer S.Villegas helper N.pdf
 
CSE 110 - Lab 6 What this Lab Is About  Working wi.docx
CSE 110 - Lab 6 What this Lab Is About  Working wi.docxCSE 110 - Lab 6 What this Lab Is About  Working wi.docx
CSE 110 - Lab 6 What this Lab Is About  Working wi.docx
 
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
 
Team public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdfTeam public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdf
 
So Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdfSo Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdf
 
In your Person classAdd a constant field to store the current yea.pdf
In your Person classAdd a constant field to store the current yea.pdfIn your Person classAdd a constant field to store the current yea.pdf
In your Person classAdd a constant field to store the current yea.pdf
 
Overview You are tasked with writing a program called Social Security.pdf
Overview You are tasked with writing a program called Social Security.pdfOverview You are tasked with writing a program called Social Security.pdf
Overview You are tasked with writing a program called Social Security.pdf
 
Java Question---------------------------FacebookApp(Main).jav.pdf
Java Question---------------------------FacebookApp(Main).jav.pdfJava Question---------------------------FacebookApp(Main).jav.pdf
Java Question---------------------------FacebookApp(Main).jav.pdf
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry university
 
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdfThis is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
This is the official tutorial from Oracle.httpdocs.oracle.comj.pdf
 
Rd
RdRd
Rd
 
JavaAssignment6
JavaAssignment6JavaAssignment6
JavaAssignment6
 
Scala == Effective Java
Scala == Effective JavaScala == Effective Java
Scala == Effective Java
 
Grails queries
Grails   queriesGrails   queries
Grails queries
 
Refer to my progress on this assignment belowIn this problem you w.pdf
Refer to my progress on this assignment belowIn this problem you w.pdfRefer to my progress on this assignment belowIn this problem you w.pdf
Refer to my progress on this assignment belowIn this problem you w.pdf
 
Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7
 
package employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdfpackage employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdf
 
1. Section1.- Populating the list of persons on the person listing f.pdf
1. Section1.- Populating the list of persons on the person listing f.pdf1. Section1.- Populating the list of persons on the person listing f.pdf
1. Section1.- Populating the list of persons on the person listing f.pdf
 

More from jeetumordhani

write at least 3 virulence factors for staph, strep A, strep B, .pdf
write at least 3 virulence factors for staph, strep A, strep B, .pdfwrite at least 3 virulence factors for staph, strep A, strep B, .pdf
write at least 3 virulence factors for staph, strep A, strep B, .pdf
jeetumordhani
 
What is meant by modular software and why is it important How can t.pdf
What is meant by modular software and why is it important  How can t.pdfWhat is meant by modular software and why is it important  How can t.pdf
What is meant by modular software and why is it important How can t.pdf
jeetumordhani
 
NetWork Design Question1a.) In writing a letter to a Friend, what .pdf
NetWork Design Question1a.) In writing a letter to a Friend, what .pdfNetWork Design Question1a.) In writing a letter to a Friend, what .pdf
NetWork Design Question1a.) In writing a letter to a Friend, what .pdf
jeetumordhani
 
My question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdfMy question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdf
jeetumordhani
 

More from jeetumordhani (20)

• Sexual orientation is often framed on a binary-gay OR straight; ho.pdf
• Sexual orientation is often framed on a binary-gay OR straight; ho.pdf• Sexual orientation is often framed on a binary-gay OR straight; ho.pdf
• Sexual orientation is often framed on a binary-gay OR straight; ho.pdf
 
You heated the samples containing your cheek cells. Think carefully .pdf
You heated the samples containing your cheek cells. Think carefully .pdfYou heated the samples containing your cheek cells. Think carefully .pdf
You heated the samples containing your cheek cells. Think carefully .pdf
 
write at least 3 virulence factors for staph, strep A, strep B, .pdf
write at least 3 virulence factors for staph, strep A, strep B, .pdfwrite at least 3 virulence factors for staph, strep A, strep B, .pdf
write at least 3 virulence factors for staph, strep A, strep B, .pdf
 
Why have rodents been spectacularly successful What role do you thi.pdf
Why have rodents been spectacularly successful What role do you thi.pdfWhy have rodents been spectacularly successful What role do you thi.pdf
Why have rodents been spectacularly successful What role do you thi.pdf
 
Who writes the ethical codeSolutionThe Code of Ethics states .pdf
Who writes the ethical codeSolutionThe Code of Ethics states .pdfWho writes the ethical codeSolutionThe Code of Ethics states .pdf
Who writes the ethical codeSolutionThe Code of Ethics states .pdf
 
Which of these studies might be analyzed with a correlationThe wh.pdf
Which of these studies might be analyzed with a correlationThe wh.pdfWhich of these studies might be analyzed with a correlationThe wh.pdf
Which of these studies might be analyzed with a correlationThe wh.pdf
 
Which of the following statements about instant messaging is incorre.pdf
Which of the following statements about instant messaging is incorre.pdfWhich of the following statements about instant messaging is incorre.pdf
Which of the following statements about instant messaging is incorre.pdf
 
Which of the following is not a property of a normal curve A. Bell .pdf
Which of the following is not a property of a normal curve A. Bell .pdfWhich of the following is not a property of a normal curve A. Bell .pdf
Which of the following is not a property of a normal curve A. Bell .pdf
 
What tissue type has polarity and is avascular What tissue.pdf
What tissue type has polarity and is avascular  What tissue.pdfWhat tissue type has polarity and is avascular  What tissue.pdf
What tissue type has polarity and is avascular What tissue.pdf
 
What organizations are involved in Internet2How is this developme.pdf
What organizations are involved in Internet2How is this developme.pdfWhat organizations are involved in Internet2How is this developme.pdf
What organizations are involved in Internet2How is this developme.pdf
 
What is meant by modular software and why is it important How can t.pdf
What is meant by modular software and why is it important  How can t.pdfWhat is meant by modular software and why is it important  How can t.pdf
What is meant by modular software and why is it important How can t.pdf
 
What are the two major steps in biological classification What .pdf
What are the two major steps in biological classification  What .pdfWhat are the two major steps in biological classification  What .pdf
What are the two major steps in biological classification What .pdf
 
Tissue transplant rejection is primarily atype I reaction.type I.pdf
Tissue transplant rejection is primarily atype I reaction.type I.pdfTissue transplant rejection is primarily atype I reaction.type I.pdf
Tissue transplant rejection is primarily atype I reaction.type I.pdf
 
The members of the UN peace committee, must choose, from among thems.pdf
The members of the UN peace committee, must choose, from among thems.pdfThe members of the UN peace committee, must choose, from among thems.pdf
The members of the UN peace committee, must choose, from among thems.pdf
 
NetWork Design Question1a.) In writing a letter to a Friend, what .pdf
NetWork Design Question1a.) In writing a letter to a Friend, what .pdfNetWork Design Question1a.) In writing a letter to a Friend, what .pdf
NetWork Design Question1a.) In writing a letter to a Friend, what .pdf
 
Please help me with thisLet x denote a single observation of a no.pdf
Please help me with thisLet x denote a single observation of a no.pdfPlease help me with thisLet x denote a single observation of a no.pdf
Please help me with thisLet x denote a single observation of a no.pdf
 
Numerical Methods yi + 1 = y_i + Phi (x_i, y_i, h) Consider the equ.pdf
Numerical Methods yi + 1 = y_i + Phi (x_i, y_i, h)  Consider the equ.pdfNumerical Methods yi + 1 = y_i + Phi (x_i, y_i, h)  Consider the equ.pdf
Numerical Methods yi + 1 = y_i + Phi (x_i, y_i, h) Consider the equ.pdf
 
My question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdfMy question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdf
 
Java AssignmentConvert infix to postfix.SolutionTo convert i.pdf
Java AssignmentConvert infix to postfix.SolutionTo convert i.pdfJava AssignmentConvert infix to postfix.SolutionTo convert i.pdf
Java AssignmentConvert infix to postfix.SolutionTo convert i.pdf
 
Irreducible polynomials over a field F play a similar, in a certain .pdf
Irreducible polynomials over a field F play a similar, in a certain .pdfIrreducible polynomials over a field F play a similar, in a certain .pdf
Irreducible polynomials over a field F play a similar, in a certain .pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 

You will need to develop a system that can track employee informatio.pdf

  • 1. You will need to develop a system that can track employee information for two Organizations (such as Google and Microsoft). The Employee information you must track is as follows: Name Gender Job Title Organization they work for Birthday As for the Organization that the Employee works for, you must also track this information: Organization Name Number of Employees The system must be able to properly compare any two employees against each other to determine if they are the same Employee. This means that if you compared two Employees with the same Name, Gender, Birthday and Organization, the system should think that they are equal to one another. If any of these properties are different, then the two Employees are not the same Employee. The same rules apply to comparing Organizations to one another. Organizations with the same Organization name are to be thought of as equal, different names means different organizations. Use the charts on the next page to create your classes. Employee private String name; private String gender; private String jobTitle; private Organization organization; private String birthDate; Employee(String theName, String theGender, String title, Organization org, String theBirthDate) <> String getName() String getGender() String getJobTitle() Organization getOrganization() String getBirthDate() String toString() boolean equals(Employee other)
  • 2. <> void changeJobTitle (String newTitle) void changeName(String newName) void changeOrganization(Organization org) Organization private String organizationName; private int numEmployees; Organization(String name, int employees) <> String getOrganizationName() int getNumEmployees() String toString() boolean equals(Organization other) <> void changeOrganizationName(String newName) *****NOTE: All constructors and methods should be public. ***** *Note: There is a zip file listed that has a starts for each of the classes that are required. They are located in the source file and you will also find a test file for the program. STARTER CODE - EMPLOYEE public class Employee { } STARTER CODE - ORGANIZATION /** * Organization.java * * @author - Jane Doe * @author - Period n * @author - Id nnnnnnn * * @author - I received help from ... * */ public class Organization {
  • 3. } TESTER CODE /** * This class tests the Employee and Organization classes. */ public class Tester { public static void main(String[] args) { Employee emp1 = new Employee("Sally Brown", "Female", "Vice President", new Organization("Google", 5500), "11-11-1969"); System.out.println(emp1); System.out.println(); System.out.println("Name should be Sally Brown and is " + emp1.getName()); System.out.println("Gender should be Female and is " + emp1.getGender()); System.out.println("Job title should be Vice President and is " + emp1.getJobTitle()); System.out.println("Birth date should be 11-11-1969 and is " + emp1.getBirthDate()); System.out.println("Organization should be Google and is " + emp1.getOrganization().getOrganizationName()); System.out.println("Number of employees in organization should be 5500 and is " + emp1.getOrganization().getNumEmployees()); System.out.println(); Employee emp2 = new Employee("Sally Brown", "Female", "Vice President", new Organization("Google", 5500), "11-11-1969"); System.out.println(emp2); System.out.println(); System.out.println("Name should be Sally Brown and is " + emp2.getName()); System.out.println("Gender should be Female and is " + emp2.getGender()); System.out.println("Job title should be Vice President and is " + emp2.getJobTitle()); System.out.println("Birth date should be 11-11-1969 and is " + emp2.getBirthDate()); System.out.println("Organization should be Google and is " + emp2.getOrganization().getOrganizationName()); System.out.println("Number of employees in organization should be 5500 and is " + emp2.getOrganization().getNumEmployees());
  • 4. System.out.println(); Employee emp3 = new Employee("Charlie Brown", "Male", "President", new Organization("Microsoft", 15500), "9-15-1965"); System.out.println(emp3); System.out.println(); System.out.println("Name should be Charlie Brown and is " + emp3.getName()); System.out.println("Gender should be Male and is " + emp3.getGender()); System.out.println("Job title should be President and is " + emp3.getJobTitle()); System.out.println("Birth date should be 9-14-1965 and is " + emp3.getBirthDate()); System.out.println("Organization should be Microsoft and is " + emp3.getOrganization().getOrganizationName()); System.out.println("Number of employees in organization should be 15500 and is " + emp3.getOrganization().getNumEmployees()); System.out.println(); Employee emp4 = new Employee("Charlie Brown", "Male", "President", new Organization("Google", 5500), "9-15-1965"); System.out.println(emp4); System.out.println(); System.out.println("Name should be Charlie Brown and is " + emp4.getName()); System.out.println("Gender should be Male and is " + emp4.getGender()); System.out.println("Job title should be President and is " + emp4.getJobTitle()); System.out.println("Birth date should be 9-14-1965 and is " + emp4.getBirthDate()); System.out.println("Organization should be Google and is " + emp4.getOrganization().getOrganizationName()); System.out.println("Number of employees in organization should be 5500 and is " + emp4.getOrganization().getNumEmployees()); System.out.println(); System.out.println("emp1.equals(emp2) should be true and is " + emp1.equals(emp2)); System.out.println("emp1.equals(emp3) should be false and is " + emp1.equals(emp3)); System.out.println("emp1.equals(emp4) should be false and is " + emp1.equals(emp4)); System.out.println("emp2.equals(emp3) should be false and is " + emp2.equals(emp3)); System.out.println("emp2.equals(emp4) should be false and is " + emp2.equals(emp4)); System.out.println("emp3.equals(emp4) should be false and is " + emp3.equals(emp4));
  • 5. } } Employee private String name; private String gender; private String jobTitle; private Organization organization; private String birthDate; Employee(String theName, String theGender, String title, Organization org, String theBirthDate) <> String getName() String getGender() String getJobTitle() Organization getOrganization() String getBirthDate() String toString() boolean equals(Employee other) <> void changeJobTitle (String newTitle) void changeName(String newName) void changeOrganization(Organization org) Solution public class Employee { private String name; private String gender; private String jobTitle; private Organization organization; private String birthDate; /** * @param name * @param gender * @param jobTitle
  • 6. * @param organization * @param birthDate */ public Employee(String name, String gender, String jobTitle, Organization organization, String birthDate) { this.name = name; this.gender = gender; this.jobTitle = jobTitle; this.organization = organization; this.birthDate = birthDate; } public String getName() { return name; } public String getGender() { return gender; } public String getJobTitle() { return jobTitle; } public Organization getOrganization() { return organization; } public String getBirthDate() { return birthDate; } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ @Override public String toString() { return "Employee [name=" + name + ", gender=" + gender + ", jobTitle=" + jobTitle + ", organization=" + organization + ", birthDate=" + birthDate + "]";
  • 7. } public void changeJobTitle(String newTitle) { this.jobTitle = newTitle; } public void changeName(String newName) { this.name = newName; } public void changeOrganization(Organization org) { this.organization = org; } /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((birthDate == null) ? 0 : birthDate.hashCode()); result = prime * result + ((gender == null) ? 0 : gender.hashCode()); result = prime * result + ((jobTitle == null) ? 0 : jobTitle.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((organization == null) ? 0 : organization.hashCode()); return result; } /* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) {
  • 8. if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Employee)) return false; Employee other = (Employee) obj; if (birthDate == null) { if (other.birthDate != null) return false; } else if (!birthDate.equals(other.birthDate)) return false; if (gender == null) { if (other.gender != null) return false; } else if (!gender.equals(other.gender)) return false; if (jobTitle == null) { if (other.jobTitle != null) return false; } else if (!jobTitle.equals(other.jobTitle)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (organization == null) { if (other.organization != null) return false; } else if (!organization.equals(other.organization)) return false; return true; } } public class Organization {
  • 9. private String organizationName; private int numEmployees; /** * @param organizationName * @param numEmployees */ public Organization(String organizationName, int numEmployees) { this.organizationName = organizationName; this.numEmployees = numEmployees; } public String getOrganizationName() { return organizationName; } public int getNumEmployees() { return numEmployees; } public void changeOrganizationName(String newName) { this.organizationName = newName; } /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + numEmployees; result = prime * result + ((organizationName == null) ? 0 : organizationName.hashCode()); return result; } /* * (non-Javadoc)
  • 10. * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Organization)) return false; Organization other = (Organization) obj; if (numEmployees != other.numEmployees) return false; if (organizationName == null) { if (other.organizationName != null) return false; } else if (!organizationName.equals(other.organizationName)) return false; return true; } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ @Override public String toString() { return "Organization [organizationName=" + organizationName + ", numEmployees=" + numEmployees + "]"; } } public class Tester { public static void main(String[] args) { Employee emp1 = new Employee("Sally Brown", "Female", "Vice President", new Organization("Google", 5500), "11-11-1969");
  • 11. System.out.println(emp1); System.out.println(); System.out.println("Name should be Sally Brown and is " + emp1.getName()); System.out .println("Gender should be Female and is " + emp1.getGender()); System.out.println("Job title should be Vice President and is " + emp1.getJobTitle()); System.out.println("Birth date should be 11-11-1969 and is " + emp1.getBirthDate()); System.out.println("Organization should be Google and is " + emp1.getOrganization().getOrganizationName()); System.out .println("Number of employees in organization should be 5500 and is " + emp1.getOrganization().getNumEmployees()); System.out.println(); Employee emp2 = new Employee("Sally Brown", "Female", "Vice President", new Organization("Google", 5500), "11-11-1969"); System.out.println(emp2); System.out.println(); System.out.println("Name should be Sally Brown and is " + emp2.getName()); System.out .println("Gender should be Female and is " + emp2.getGender()); System.out.println("Job title should be Vice President and is " + emp2.getJobTitle()); System.out.println("Birth date should be 11-11-1969 and is " + emp2.getBirthDate()); System.out.println("Organization should be Google and is " + emp2.getOrganization().getOrganizationName()); System.out .println("Number of employees in organization should be 5500 and is " + emp2.getOrganization().getNumEmployees()); System.out.println(); Employee emp3 = new Employee("Charlie Brown", "Male", "President", new Organization("Microsoft", 15500), "9-15-1965");
  • 12. System.out.println(emp3); System.out.println(); System.out.println("Name should be Charlie Brown and is " + emp3.getName()); System.out.println("Gender should be Male and is " + emp3.getGender()); System.out.println("Job title should be President and is " + emp3.getJobTitle()); System.out.println("Birth date should be 9-14-1965 and is " + emp3.getBirthDate()); System.out.println("Organization should be Microsoft and is " + emp3.getOrganization().getOrganizationName()); System.out .println("Number of employees in organization should be 15500 and is " + emp3.getOrganization().getNumEmployees()); System.out.println(); Employee emp4 = new Employee("Charlie Brown", "Male", "President", new Organization("Google", 5500), "9-15-1965"); System.out.println(emp4); System.out.println(); System.out.println("Name should be Charlie Brown and is " + emp4.getName()); System.out.println("Gender should be Male and is " + emp4.getGender()); System.out.println("Job title should be President and is " + emp4.getJobTitle()); System.out.println("Birth date should be 9-14-1965 and is " + emp4.getBirthDate()); System.out.println("Organization should be Google and is " + emp4.getOrganization().getOrganizationName()); System.out .println("Number of employees in organization should be 5500 and is " + emp4.getOrganization().getNumEmployees()); System.out.println(); System.out.println("emp1.equals(emp2) should be true and is " + emp1.equals(emp2)); System.out.println("emp1.equals(emp3) should be false and is " + emp1.equals(emp3));
  • 13. System.out.println("emp1.equals(emp4) should be false and is " + emp1.equals(emp4)); System.out.println("emp2.equals(emp3) should be false and is " + emp2.equals(emp3)); System.out.println("emp2.equals(emp4) should be false and is " + emp2.equals(emp4)); System.out.println("emp3.equals(emp4) should be false and is " + emp3.equals(emp4)); } } OUTPUT: Employee [name=Sally Brown, gender=Female, jobTitle=Vice President, organization=Organization [organizationName=Google, numEmployees=5500], birthDate=11-11-1969] Name should be Sally Brown and is Sally Brown Gender should be Female and is Female Job title should be Vice President and is Vice President Birth date should be 11-11-1969 and is 11-11-1969 Organization should be Google and is Google Number of employees in organization should be 5500 and is 5500 Employee [name=Sally Brown, gender=Female, jobTitle=Vice President, organization=Organization [organizationName=Google, numEmployees=5500], birthDate=11-11-1969] Name should be Sally Brown and is Sally Brown Gender should be Female and is Female Job title should be Vice President and is Vice President Birth date should be 11-11-1969 and is 11-11-1969 Organization should be Google and is Google Number of employees in organization should be 5500 and is 5500 Employee [name=Charlie Brown, gender=Male, jobTitle=President, organization=Organization [organizationName=Microsoft, numEmployees=15500], birthDate=9-15-1965] Name should be Charlie Brown and is Charlie Brown Gender should be Male and is Male Job title should be President and is President Birth date should be 9-14-1965 and is 9-15-1965 Organization should be Microsoft and is Microsoft
  • 14. Number of employees in organization should be 15500 and is 15500 Employee [name=Charlie Brown, gender=Male, jobTitle=President, organization=Organization [organizationName=Google, numEmployees=5500], birthDate=9-15-1965] Name should be Charlie Brown and is Charlie Brown Gender should be Male and is Male Job title should be President and is President Birth date should be 9-14-1965 and is 9-15-1965 Organization should be Google and is Google Number of employees in organization should be 5500 and is 5500 emp1.equals(emp2) should be true and is true emp1.equals(emp3) should be false and is false emp1.equals(emp4) should be false and is false emp2.equals(emp3) should be false and is false emp2.equals(emp4) should be false and is false emp3.equals(emp4) should be false and is false