Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need to make a Employee and an organization; employee must have name, birthday, organization, and jobtitle. the organization must of organization name and number

i need to make a Employee and an organization; employee must have name, birthday, organization, and jobtitle. the organization must of organization name and number of employees. i understand how to make the two however i dont know how to keep track of how many employees belong to companyA and companyB" furthermore, i need to be able to compare employees to see if they are the same person.the exact problom is below.

public class Employee { private String name; private int idNumber = 0; String birthDay; private Organization organization; private String jobTitle; public Employee(String name, String birthDay, String jobTitle, Organization organization) { this.name = name; this.idNumber = this.idNumber++; this.birthDay = birthDay; this.organization = organization; this.jobTitle = jobTitle; } public String getJobTitle() { return jobTitle; } public Organization getOrganization() { return organization; } public String getBirthDay() { return birthDay; } public int getIdNumber() { return idNumber; } public String getName() { return name; } public String toString() { return "Employee: " + name  + "  Job Title: " + jobTitle  + "  Organization:" + organization  + "  BirthDate: " + birthDay; } } 

******************************************************************************************************************************************

public class Organization { private String organization; private int employeeCount; public Organization(String organization){ this.organization=organization; //incrament employee counte for organization passed in some how. } public int getEmployeeCount() { return employeeCount; } public String getOrganization() { return organization; } } 
 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

5. If yes, then why?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago