SlideShare a Scribd company logo
Implementation
Your program shall contain at least the following classes for the DEP.
Define a class Department in a source file Department.java that contains private
data members:
dNumber: Department number. It is an integer type.
dName: Department name. It is a String type.
manager: Department manager. It is an integer type.
budget: Department budget. It is a double type.
startDate: Manager start date. It is a String type.
Implement Java methods in the file Department.java that include:
Parameterized constructor that assigns values to all data members.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class Employee in a source file Employee.java that contains private data
members:
eNumber: Employee number. It is an integer type.
eName: Employee name. It is a String type.
dob: Date of birth. It is a String type.
address: Employee address. It is a String type.
gender: Employee gender. It is a String type.
salary: Employee salary. It is a double type.
supervisor: Supervisor number. It is an integer type.
dNumber: Department number. It is an integer type.
Implement Java methods in the file Employee.java that include:
Parameterized constructor that assigns values to all data members.
Public method getNumber that returns the employee number.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class Project in a source file Project.java that contains private data
members:
pNumber: Project number. It is a long integer type.
title: Project title. It is a String type.
sponsor: Project sponsor. It is a String type.
dNumber: Department number. It is an integer type.
budget: Project budget. It is a double type.
Implement Java methods in the file Project.java that include:
Parameterized constructor that assigns values to all data members.
Public method getNumber that returns the project number.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class WorksOn in a source file WorksOn.java that contains private data
members:
proj: Project object. It is a Project type.
emp: Employee object. It is an Employee type.
hours: Total working hours. It is an integer type.
Implement Java methods in the file WorksOn.java that include:
Parameterized constructor that assigns values to all data members.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class DEP in a source file DEP.java that contains private data members:
depts: A container that can store departments. It is an ArrayList of
Department type.
emps: A container that can store employees. It is an ArrayList of Employee
type.
projs: A container that can store projects. It is an ArrayList of Project type.
works: A container that can store objects of works on. It is an ArrayList of
WorksOn type.
Implement Java methods in the file DEP.java that include:
Default constructor that initialise values to all data members.
Use the departments information provided below to add the objects of
departments to the correct container.
Use the employees information provided below to add the objects of
employees to the correct container.
Use the projects information provided below to add the objects of projects to
the correct container.
Display a menu that includes items below.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a record for an employee who works on a project.
0. Exit.
The Java program gets an input number of the menu and processes the
required method for that item until 0 is input.
When item 1 is selected, the method displays all the department information.
When item 2 is selected, the method displays all the employee information.
When item 3 is selected, the method displays all project information.
When item 4 is selected, the method displays all information for employees
who works on projects.
When item 5 is selected, the method gets inputs of employee number, project
number and total hours that the employee works on the project.
The method verifies input information:
o If the employee exists, then save it to an employee object variable.
o If the project exists, then save it to a project object variable.
o If the employee has not been allocated to the project, input the total
working hours. Save the works on information to the correct
container.
o Otherwise, the method returns to the caller.
Testing data
The data of departments, employees and projects are given below.
Department:
1, "SALES", 110, 1234.00, "02/01/2012"
2, "ACCOUNTING", 120, 5566789.50, "30/10/2010"
3, "GAMES", 150, 100000.00, "01/03/2008"
4, "HUMAN RESOURCES", 200, 500000.0, "02/01/2013"
5, "SPORTS", 250, 8500000.00, "10/05/2010"
6, "RESEARCH", 300, 45500.00, "10/06/2020"
7, "EDUCATION", 350, 100000.00, "10/07/2019"
8, "FINANCE", 500, 8400000.00, "10/08/2022"
9, "COMPUTING", 600, 90000.00, "10/09/2018"
Employee:
600, "Willy", "01/01/1988", "41 Station Street, Wollongong,
NSW 2500", "M", 250.5, 0, 9
700, "Zhi", "12/09/1999", "112 Smith Street, Windang, NSW
2525", "M", 80.2, 600, 9
800, "Mary", "03/10/2000", "26 Gibsons Road, Figtree, NSW
2525", "F", 50.0, 700, 9
500, "Angelina", "20/11/1990", "25 Bong Bong Road, Horsley,
NSW 2530", "F", 250.0, 0, 8
510, "Anna", "20/11/1990", "200 Cemetary Road, Hawea, NSW
2800", "F", 100.0, 500, 8
520, "Madelaine", "20/11/1990", "23 Lake View Street,
Figtree, NSW 2525", "F", 50.0, 510, 8
530, "Robert", "20/11/1990", "80 Penny Road, Windang, NSW
2520", "M", 50.0, 510, 8
540, "Claudio", "20/11/1990", "23 Horsley Street,
Unanderra, NSW 2528", "M", 50.0, 510, 8
350, "Brian", "13/05/1965", "23 Station Street, Wollongong,
NSW 2500", "M", 200.4, 0, 7
110, "Alvin", "13/10/1977", "56 Marlo Road, Wollongong, NSW
2500", "M", 156.4, 100, 1
Project:
1001, "Computation", "Microsoft", 8, 25000
1002, "Study methods", "Education committee", 3, 15000
1003, "Racing car", "Cloud Pty Ltd", 3, 225000
1004, "Football", "Football Club", 5, 35000
1005, "Swimming", "Education Committee", 5, 125000
1006, "Database", "Database Committee", 5, 125000
Implementation
Your program shall contain at least the following classes for the DEP.
Define a class Department in a source file Department.java that contains private
data members:
dNumber: Department number. It is an integer type.
dName: Department name. It is a String type.
manager: Department manager. It is an integer type.
budget: Department budget. It is a double type.
startDate: Manager start date. It is a String type.
Implement Java methods in the file Department.java that include:
Parameterized constructor that assigns values to all data members.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class Employee in a source file Employee.java that contains private data
members:
eNumber: Employee number. It is an integer type.
eName: Employee name. It is a String type.
dob: Date of birth. It is a String type.
address: Employee address. It is a String type.
gender: Employee gender. It is a String type.
salary: Employee salary. It is a double type.
supervisor: Supervisor number. It is an integer type.
dNumber: Department number. It is an integer type.
Implement Java methods in the file Employee.java that include:
Parameterized constructor that assigns values to all data members.
Public method getNumber that returns the employee number.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class Project in a source file Project.java that contains private data
members:
pNumber: Project number. It is a long integer type.
title: Project title. It is a String type.
sponsor: Project sponsor. It is a String type.
dNumber: Department number. It is an integer type.
budget: Project budget. It is a double type.
Implement Java methods in the file Project.java that include:
Parameterized constructor that assigns values to all data members.
Public method getNumber that returns the project number.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class WorksOn in a source file WorksOn.java that contains private data
members:
proj: Project object. It is a Project type.
emp: Employee object. It is an Employee type.
hours: Total working hours. It is an integer type.
Implement Java methods in the file WorksOn.java that include:
Parameterized constructor that assigns values to all data members.
Public method toString that returns the string value of all private data
members. See the examples of the processing for the details of the format of
the toString method.
Define a class DEP in a source file DEP.java that contains private data members:
depts: A container that can store departments. It is an ArrayList of
Department type.
emps: A container that can store employees. It is an ArrayList of Employee
type.
projs: A container that can store projects. It is an ArrayList of Project type.
works: A container that can store objects of works on. It is an ArrayList of
WorksOn type.
Implement Java methods in the file DEP.java that include:
Default constructor that initialise values to all data members.
Use the departments information provided below to add the objects of
departments to the correct container.
Use the employees information provided below to add the objects of
employees to the correct container.
Use the projects information provided below to add the objects of projects to
the correct container.
Display a menu that includes items below.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a record for an employee who works on a project.
0. Exit.
The Java program gets an input number of the menu and processes the
required method for that item until 0 is input.
When item 1 is selected, the method displays all the department information.
When item 2 is selected, the method displays all the employee information.
When item 3 is selected, the method displays all project information.
When item 4 is selected, the method displays all information for employees
who works on projects.
When item 5 is selected, the method gets inputs of employee number, project
number and total hours that the employee works on the project.
The method verifies input information:
o If the employee exists, then save it to an employee object variable.
o If the project exists, then save it to a project object variable.
o If the employee has not been allocated to the project, input the total
working hours. Save the works on information to the correct
container.
o Otherwise, the method returns to the caller.
Testing data
The data of departments, employees and projects are given below.
Department:
1, "SALES", 110, 1234.00, "02/01/2012"
2, "ACCOUNTING", 120, 5566789.50, "30/10/2010"
Employee:
600, "Willy", "01/01/1988", "41 Station Street, Wollongong,
NSW 2500", "M", 250.5, 0, 9
700, "Zhi", "12/09/1999", "112 Smith Street, Windang, NSW
2525", "M", 80.2, 600, 9
Project:
1001, "Computation", "Microsoft", 8, 25000
1002, "Study methods", "Education committee", 3, 15000
Please also make a UML diagram of all the classes. Thanks!

More Related Content

Similar to Implementation Your program shall contain at least the follo.pdf

Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
J. C.
 
Java: Objects and Object References
Java: Objects and Object ReferencesJava: Objects and Object References
Java: Objects and Object References
Tareq Hasan
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
arvind pandey
 
Java căn bản - Chapter10
Java căn bản - Chapter10Java căn bản - Chapter10
Java căn bản - Chapter10
Vince Vo
 
Python Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdfPython Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdf
abhishekdf3
 
data structure and c programing concepts
data structure and c programing conceptsdata structure and c programing concepts
data structure and c programing concepts
kavitham66441
 
Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput
Ahmad Idrees
 
Feature Engineering in NLP.pdf
Feature Engineering in NLP.pdfFeature Engineering in NLP.pdf
Feature Engineering in NLP.pdf
bilaje4244prolugcom
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talk
dtdannen
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
Lori Moore
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
Pranali Chaudhari
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
Mufaddal Nullwala
 
1 Goals. 1. To use a text file for output and later for in.docx
1 Goals. 1. To use a text file for output and later for in.docx1 Goals. 1. To use a text file for output and later for in.docx
1 Goals. 1. To use a text file for output and later for in.docx
honey690131
 
C programming session 09
C programming session 09C programming session 09
C programming session 09
Dushmanta Nath
 
Cis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variablesCis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variables
ccis224477
 
Arrays
ArraysArrays
Unit iii
Unit iiiUnit iii
Unit iii
SHIKHA GAUTAM
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective c
Sunny Shaikh
 
Refactoring Tips by Martin Fowler
Refactoring Tips by Martin FowlerRefactoring Tips by Martin Fowler
Refactoring Tips by Martin Fowler
Igor Crvenov
 
pointer, structure ,union and intro to file handling
pointer, structure ,union and intro to file handlingpointer, structure ,union and intro to file handling
pointer, structure ,union and intro to file handling
Rai University
 

Similar to Implementation Your program shall contain at least the follo.pdf (20)

Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
 
Java: Objects and Object References
Java: Objects and Object ReferencesJava: Objects and Object References
Java: Objects and Object References
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
 
Java căn bản - Chapter10
Java căn bản - Chapter10Java căn bản - Chapter10
Java căn bản - Chapter10
 
Python Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdfPython Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdf
 
data structure and c programing concepts
data structure and c programing conceptsdata structure and c programing concepts
data structure and c programing concepts
 
Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput
 
Feature Engineering in NLP.pdf
Feature Engineering in NLP.pdfFeature Engineering in NLP.pdf
Feature Engineering in NLP.pdf
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talk
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
1 Goals. 1. To use a text file for output and later for in.docx
1 Goals. 1. To use a text file for output and later for in.docx1 Goals. 1. To use a text file for output and later for in.docx
1 Goals. 1. To use a text file for output and later for in.docx
 
C programming session 09
C programming session 09C programming session 09
C programming session 09
 
Cis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variablesCis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variables
 
Arrays
ArraysArrays
Arrays
 
Unit iii
Unit iiiUnit iii
Unit iii
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective c
 
Refactoring Tips by Martin Fowler
Refactoring Tips by Martin FowlerRefactoring Tips by Martin Fowler
Refactoring Tips by Martin Fowler
 
pointer, structure ,union and intro to file handling
pointer, structure ,union and intro to file handlingpointer, structure ,union and intro to file handling
pointer, structure ,union and intro to file handling
 

More from ADITIEYEWEAR

In a study on the retirement savings plans of young Canadian.pdf
In a study on the retirement savings plans of young Canadian.pdfIn a study on the retirement savings plans of young Canadian.pdf
In a study on the retirement savings plans of young Canadian.pdf
ADITIEYEWEAR
 
In a spreadsheet decompose the change in the debt ratio fro.pdf
In a spreadsheet decompose the change in the debt ratio fro.pdfIn a spreadsheet decompose the change in the debt ratio fro.pdf
In a spreadsheet decompose the change in the debt ratio fro.pdf
ADITIEYEWEAR
 
In a school there are 5 sections of 10th standard with same.pdf
In a school there are 5 sections of 10th standard with same.pdfIn a school there are 5 sections of 10th standard with same.pdf
In a school there are 5 sections of 10th standard with same.pdf
ADITIEYEWEAR
 
In a recent year grade 10 Washington State public school st.pdf
In a recent year grade 10 Washington State public school st.pdfIn a recent year grade 10 Washington State public school st.pdf
In a recent year grade 10 Washington State public school st.pdf
ADITIEYEWEAR
 
In a recent poll the Gallup Organization found that 45 of.pdf
In a recent poll the Gallup Organization found  that 45 of.pdfIn a recent poll the Gallup Organization found  that 45 of.pdf
In a recent poll the Gallup Organization found that 45 of.pdf
ADITIEYEWEAR
 
In a random sample of UTC students 50 indicated they are b.pdf
In a random sample of UTC students 50 indicated they are b.pdfIn a random sample of UTC students 50 indicated they are b.pdf
In a random sample of UTC students 50 indicated they are b.pdf
ADITIEYEWEAR
 
In a previous yeac the weights of the members of the San Fra.pdf
In a previous yeac the weights of the members of the San Fra.pdfIn a previous yeac the weights of the members of the San Fra.pdf
In a previous yeac the weights of the members of the San Fra.pdf
ADITIEYEWEAR
 
In a questionnaire for 100 pernens the gender distribution .pdf
In a questionnaire for 100 pernens the gender distribution .pdfIn a questionnaire for 100 pernens the gender distribution .pdf
In a questionnaire for 100 pernens the gender distribution .pdf
ADITIEYEWEAR
 
In a normal distribution what is the probability that a ran.pdf
In a normal distribution what is the probability that a ran.pdfIn a normal distribution what is the probability that a ran.pdf
In a normal distribution what is the probability that a ran.pdf
ADITIEYEWEAR
 
In 2019 scientists conducted a research study about spicy f.pdf
In 2019 scientists conducted a research study about spicy f.pdfIn 2019 scientists conducted a research study about spicy f.pdf
In 2019 scientists conducted a research study about spicy f.pdf
ADITIEYEWEAR
 
In a holiday gathering two families family 1 and family 2 .pdf
In a holiday gathering two families family 1 and family 2 .pdfIn a holiday gathering two families family 1 and family 2 .pdf
In a holiday gathering two families family 1 and family 2 .pdf
ADITIEYEWEAR
 
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdfin 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
ADITIEYEWEAR
 
In a city of half a million there are initially 400 cases o.pdf
In a city of half a million there are initially 400 cases o.pdfIn a city of half a million there are initially 400 cases o.pdf
In a city of half a million there are initially 400 cases o.pdf
ADITIEYEWEAR
 
In a 10year graph with an explanation of Idaho Panhandle H.pdf
In a 10year graph with an explanation of Idaho Panhandle H.pdfIn a 10year graph with an explanation of Idaho Panhandle H.pdf
In a 10year graph with an explanation of Idaho Panhandle H.pdf
ADITIEYEWEAR
 
In 2D let xx1x2 Write down the explicit cubic feature.pdf
In 2D let xx1x2 Write down the explicit cubic feature.pdfIn 2D let xx1x2 Write down the explicit cubic feature.pdf
In 2D let xx1x2 Write down the explicit cubic feature.pdf
ADITIEYEWEAR
 
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdfIn 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
ADITIEYEWEAR
 
In 2021 California passed a law to provide all public schoo.pdf
In 2021 California passed a law to provide all public schoo.pdfIn 2021 California passed a law to provide all public schoo.pdf
In 2021 California passed a law to provide all public schoo.pdf
ADITIEYEWEAR
 
import yfinance as yf yfTickerstickersAAPL TSLA.pdf
import yfinance as yf yfTickerstickersAAPL TSLA.pdfimport yfinance as yf yfTickerstickersAAPL TSLA.pdf
import yfinance as yf yfTickerstickersAAPL TSLA.pdf
ADITIEYEWEAR
 
In 2020 Natural Selection a nationwide computer dating se.pdf
In 2020 Natural Selection a  nationwide computer dating se.pdfIn 2020 Natural Selection a  nationwide computer dating se.pdf
In 2020 Natural Selection a nationwide computer dating se.pdf
ADITIEYEWEAR
 
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdfIn 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
ADITIEYEWEAR
 

More from ADITIEYEWEAR (20)

In a study on the retirement savings plans of young Canadian.pdf
In a study on the retirement savings plans of young Canadian.pdfIn a study on the retirement savings plans of young Canadian.pdf
In a study on the retirement savings plans of young Canadian.pdf
 
In a spreadsheet decompose the change in the debt ratio fro.pdf
In a spreadsheet decompose the change in the debt ratio fro.pdfIn a spreadsheet decompose the change in the debt ratio fro.pdf
In a spreadsheet decompose the change in the debt ratio fro.pdf
 
In a school there are 5 sections of 10th standard with same.pdf
In a school there are 5 sections of 10th standard with same.pdfIn a school there are 5 sections of 10th standard with same.pdf
In a school there are 5 sections of 10th standard with same.pdf
 
In a recent year grade 10 Washington State public school st.pdf
In a recent year grade 10 Washington State public school st.pdfIn a recent year grade 10 Washington State public school st.pdf
In a recent year grade 10 Washington State public school st.pdf
 
In a recent poll the Gallup Organization found that 45 of.pdf
In a recent poll the Gallup Organization found  that 45 of.pdfIn a recent poll the Gallup Organization found  that 45 of.pdf
In a recent poll the Gallup Organization found that 45 of.pdf
 
In a random sample of UTC students 50 indicated they are b.pdf
In a random sample of UTC students 50 indicated they are b.pdfIn a random sample of UTC students 50 indicated they are b.pdf
In a random sample of UTC students 50 indicated they are b.pdf
 
In a previous yeac the weights of the members of the San Fra.pdf
In a previous yeac the weights of the members of the San Fra.pdfIn a previous yeac the weights of the members of the San Fra.pdf
In a previous yeac the weights of the members of the San Fra.pdf
 
In a questionnaire for 100 pernens the gender distribution .pdf
In a questionnaire for 100 pernens the gender distribution .pdfIn a questionnaire for 100 pernens the gender distribution .pdf
In a questionnaire for 100 pernens the gender distribution .pdf
 
In a normal distribution what is the probability that a ran.pdf
In a normal distribution what is the probability that a ran.pdfIn a normal distribution what is the probability that a ran.pdf
In a normal distribution what is the probability that a ran.pdf
 
In 2019 scientists conducted a research study about spicy f.pdf
In 2019 scientists conducted a research study about spicy f.pdfIn 2019 scientists conducted a research study about spicy f.pdf
In 2019 scientists conducted a research study about spicy f.pdf
 
In a holiday gathering two families family 1 and family 2 .pdf
In a holiday gathering two families family 1 and family 2 .pdfIn a holiday gathering two families family 1 and family 2 .pdf
In a holiday gathering two families family 1 and family 2 .pdf
 
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdfin 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
in 2019 facebook Announced is Plan 70 pon out a nea stablec.pdf
 
In a city of half a million there are initially 400 cases o.pdf
In a city of half a million there are initially 400 cases o.pdfIn a city of half a million there are initially 400 cases o.pdf
In a city of half a million there are initially 400 cases o.pdf
 
In a 10year graph with an explanation of Idaho Panhandle H.pdf
In a 10year graph with an explanation of Idaho Panhandle H.pdfIn a 10year graph with an explanation of Idaho Panhandle H.pdf
In a 10year graph with an explanation of Idaho Panhandle H.pdf
 
In 2D let xx1x2 Write down the explicit cubic feature.pdf
In 2D let xx1x2 Write down the explicit cubic feature.pdfIn 2D let xx1x2 Write down the explicit cubic feature.pdf
In 2D let xx1x2 Write down the explicit cubic feature.pdf
 
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdfIn 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
In 2018 Tirana Trucks had a retum on equity of 180 and a.pdf
 
In 2021 California passed a law to provide all public schoo.pdf
In 2021 California passed a law to provide all public schoo.pdfIn 2021 California passed a law to provide all public schoo.pdf
In 2021 California passed a law to provide all public schoo.pdf
 
import yfinance as yf yfTickerstickersAAPL TSLA.pdf
import yfinance as yf yfTickerstickersAAPL TSLA.pdfimport yfinance as yf yfTickerstickersAAPL TSLA.pdf
import yfinance as yf yfTickerstickersAAPL TSLA.pdf
 
In 2020 Natural Selection a nationwide computer dating se.pdf
In 2020 Natural Selection a  nationwide computer dating se.pdfIn 2020 Natural Selection a  nationwide computer dating se.pdf
In 2020 Natural Selection a nationwide computer dating se.pdf
 
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdfIn 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
In 2017 Americans spent a recordhigh 91 billion on Hallo.pdf
 

Recently uploaded

2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
2 Post harvest Physiology of Horticulture produce.pptx
2 Post harvest Physiology of Horticulture  produce.pptx2 Post harvest Physiology of Horticulture  produce.pptx
2 Post harvest Physiology of Horticulture produce.pptx
UmeshTimilsina1
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa
 
A beginner’s guide to project reviews - everything you wanted to know but wer...
A beginner’s guide to project reviews - everything you wanted to know but wer...A beginner’s guide to project reviews - everything you wanted to know but wer...
A beginner’s guide to project reviews - everything you wanted to know but wer...
Association for Project Management
 
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
ALBERTHISOLER1
 
INSIDE OUT - PowerPoint Presentation.pptx
INSIDE OUT - PowerPoint Presentation.pptxINSIDE OUT - PowerPoint Presentation.pptx
INSIDE OUT - PowerPoint Presentation.pptx
RODELAZARES3
 
Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
Excellence Foundation for South Sudan
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
Scholarhat
 
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
mansk2
 
FINAL MATATAG Science CG 2023 Grades 3-10.pdf
FINAL MATATAG Science CG 2023 Grades 3-10.pdfFINAL MATATAG Science CG 2023 Grades 3-10.pdf
FINAL MATATAG Science CG 2023 Grades 3-10.pdf
maritescanete2
 
Odoo 17 Events - Attendees List Scanning
Odoo 17 Events - Attendees List ScanningOdoo 17 Events - Attendees List Scanning
Odoo 17 Events - Attendees List Scanning
Celine George
 
MathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptxMathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptx
nolicaliso1
 
1. Importance_of_reducing_postharvest_loss.pptx
1. Importance_of_reducing_postharvest_loss.pptx1. Importance_of_reducing_postharvest_loss.pptx
1. Importance_of_reducing_postharvest_loss.pptx
UmeshTimilsina1
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
Scholarhat
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour International
 
MVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHatMVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHat
Scholarhat
 
5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx
UmeshTimilsina1
 
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptxSD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
elwoodprias1
 
Mail Server Configuration Using App passwords in Odoo 17
Mail Server Configuration Using App passwords in Odoo 17Mail Server Configuration Using App passwords in Odoo 17
Mail Server Configuration Using App passwords in Odoo 17
Celine George
 
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptxParkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
AnujVishwakarma34
 

Recently uploaded (20)

2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
 
2 Post harvest Physiology of Horticulture produce.pptx
2 Post harvest Physiology of Horticulture  produce.pptx2 Post harvest Physiology of Horticulture  produce.pptx
2 Post harvest Physiology of Horticulture produce.pptx
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
 
A beginner’s guide to project reviews - everything you wanted to know but wer...
A beginner’s guide to project reviews - everything you wanted to know but wer...A beginner’s guide to project reviews - everything you wanted to know but wer...
A beginner’s guide to project reviews - everything you wanted to know but wer...
 
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
 
INSIDE OUT - PowerPoint Presentation.pptx
INSIDE OUT - PowerPoint Presentation.pptxINSIDE OUT - PowerPoint Presentation.pptx
INSIDE OUT - PowerPoint Presentation.pptx
 
Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
 
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
 
FINAL MATATAG Science CG 2023 Grades 3-10.pdf
FINAL MATATAG Science CG 2023 Grades 3-10.pdfFINAL MATATAG Science CG 2023 Grades 3-10.pdf
FINAL MATATAG Science CG 2023 Grades 3-10.pdf
 
Odoo 17 Events - Attendees List Scanning
Odoo 17 Events - Attendees List ScanningOdoo 17 Events - Attendees List Scanning
Odoo 17 Events - Attendees List Scanning
 
MathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptxMathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptx
 
1. Importance_of_reducing_postharvest_loss.pptx
1. Importance_of_reducing_postharvest_loss.pptx1. Importance_of_reducing_postharvest_loss.pptx
1. Importance_of_reducing_postharvest_loss.pptx
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
 
MVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHatMVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHat
 
5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx
 
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptxSD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
 
Mail Server Configuration Using App passwords in Odoo 17
Mail Server Configuration Using App passwords in Odoo 17Mail Server Configuration Using App passwords in Odoo 17
Mail Server Configuration Using App passwords in Odoo 17
 
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptxParkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
 

Implementation Your program shall contain at least the follo.pdf

  • 1. Implementation Your program shall contain at least the following classes for the DEP. Define a class Department in a source file Department.java that contains private data members: dNumber: Department number. It is an integer type. dName: Department name. It is a String type. manager: Department manager. It is an integer type. budget: Department budget. It is a double type. startDate: Manager start date. It is a String type. Implement Java methods in the file Department.java that include: Parameterized constructor that assigns values to all data members. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class Employee in a source file Employee.java that contains private data members: eNumber: Employee number. It is an integer type. eName: Employee name. It is a String type. dob: Date of birth. It is a String type. address: Employee address. It is a String type. gender: Employee gender. It is a String type. salary: Employee salary. It is a double type. supervisor: Supervisor number. It is an integer type. dNumber: Department number. It is an integer type. Implement Java methods in the file Employee.java that include: Parameterized constructor that assigns values to all data members. Public method getNumber that returns the employee number. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class Project in a source file Project.java that contains private data members: pNumber: Project number. It is a long integer type. title: Project title. It is a String type. sponsor: Project sponsor. It is a String type. dNumber: Department number. It is an integer type. budget: Project budget. It is a double type. Implement Java methods in the file Project.java that include: Parameterized constructor that assigns values to all data members. Public method getNumber that returns the project number. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of
  • 2. the toString method. Define a class WorksOn in a source file WorksOn.java that contains private data members: proj: Project object. It is a Project type. emp: Employee object. It is an Employee type. hours: Total working hours. It is an integer type. Implement Java methods in the file WorksOn.java that include: Parameterized constructor that assigns values to all data members. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class DEP in a source file DEP.java that contains private data members: depts: A container that can store departments. It is an ArrayList of Department type. emps: A container that can store employees. It is an ArrayList of Employee type. projs: A container that can store projects. It is an ArrayList of Project type. works: A container that can store objects of works on. It is an ArrayList of WorksOn type. Implement Java methods in the file DEP.java that include: Default constructor that initialise values to all data members. Use the departments information provided below to add the objects of departments to the correct container. Use the employees information provided below to add the objects of employees to the correct container. Use the projects information provided below to add the objects of projects to the correct container. Display a menu that includes items below. 1. Display all departments. 2. Display all employees. 3. Display all projects. 4. Display information for employees who works on projects. 5. Add a record for an employee who works on a project. 0. Exit. The Java program gets an input number of the menu and processes the required method for that item until 0 is input. When item 1 is selected, the method displays all the department information. When item 2 is selected, the method displays all the employee information. When item 3 is selected, the method displays all project information. When item 4 is selected, the method displays all information for employees who works on projects. When item 5 is selected, the method gets inputs of employee number, project
  • 3. number and total hours that the employee works on the project. The method verifies input information: o If the employee exists, then save it to an employee object variable. o If the project exists, then save it to a project object variable. o If the employee has not been allocated to the project, input the total working hours. Save the works on information to the correct container. o Otherwise, the method returns to the caller. Testing data The data of departments, employees and projects are given below. Department: 1, "SALES", 110, 1234.00, "02/01/2012" 2, "ACCOUNTING", 120, 5566789.50, "30/10/2010" 3, "GAMES", 150, 100000.00, "01/03/2008" 4, "HUMAN RESOURCES", 200, 500000.0, "02/01/2013" 5, "SPORTS", 250, 8500000.00, "10/05/2010" 6, "RESEARCH", 300, 45500.00, "10/06/2020" 7, "EDUCATION", 350, 100000.00, "10/07/2019" 8, "FINANCE", 500, 8400000.00, "10/08/2022" 9, "COMPUTING", 600, 90000.00, "10/09/2018" Employee: 600, "Willy", "01/01/1988", "41 Station Street, Wollongong, NSW 2500", "M", 250.5, 0, 9 700, "Zhi", "12/09/1999", "112 Smith Street, Windang, NSW 2525", "M", 80.2, 600, 9 800, "Mary", "03/10/2000", "26 Gibsons Road, Figtree, NSW 2525", "F", 50.0, 700, 9 500, "Angelina", "20/11/1990", "25 Bong Bong Road, Horsley, NSW 2530", "F", 250.0, 0, 8 510, "Anna", "20/11/1990", "200 Cemetary Road, Hawea, NSW 2800", "F", 100.0, 500, 8 520, "Madelaine", "20/11/1990", "23 Lake View Street, Figtree, NSW 2525", "F", 50.0, 510, 8 530, "Robert", "20/11/1990", "80 Penny Road, Windang, NSW 2520", "M", 50.0, 510, 8 540, "Claudio", "20/11/1990", "23 Horsley Street, Unanderra, NSW 2528", "M", 50.0, 510, 8 350, "Brian", "13/05/1965", "23 Station Street, Wollongong, NSW 2500", "M", 200.4, 0, 7 110, "Alvin", "13/10/1977", "56 Marlo Road, Wollongong, NSW 2500", "M", 156.4, 100, 1 Project:
  • 4. 1001, "Computation", "Microsoft", 8, 25000 1002, "Study methods", "Education committee", 3, 15000 1003, "Racing car", "Cloud Pty Ltd", 3, 225000 1004, "Football", "Football Club", 5, 35000 1005, "Swimming", "Education Committee", 5, 125000 1006, "Database", "Database Committee", 5, 125000 Implementation Your program shall contain at least the following classes for the DEP. Define a class Department in a source file Department.java that contains private data members: dNumber: Department number. It is an integer type. dName: Department name. It is a String type. manager: Department manager. It is an integer type. budget: Department budget. It is a double type. startDate: Manager start date. It is a String type. Implement Java methods in the file Department.java that include: Parameterized constructor that assigns values to all data members. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class Employee in a source file Employee.java that contains private data members: eNumber: Employee number. It is an integer type. eName: Employee name. It is a String type. dob: Date of birth. It is a String type. address: Employee address. It is a String type. gender: Employee gender. It is a String type. salary: Employee salary. It is a double type. supervisor: Supervisor number. It is an integer type. dNumber: Department number. It is an integer type. Implement Java methods in the file Employee.java that include: Parameterized constructor that assigns values to all data members. Public method getNumber that returns the employee number. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class Project in a source file Project.java that contains private data members: pNumber: Project number. It is a long integer type. title: Project title. It is a String type. sponsor: Project sponsor. It is a String type. dNumber: Department number. It is an integer type.
  • 5. budget: Project budget. It is a double type. Implement Java methods in the file Project.java that include: Parameterized constructor that assigns values to all data members. Public method getNumber that returns the project number. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class WorksOn in a source file WorksOn.java that contains private data members: proj: Project object. It is a Project type. emp: Employee object. It is an Employee type. hours: Total working hours. It is an integer type. Implement Java methods in the file WorksOn.java that include: Parameterized constructor that assigns values to all data members. Public method toString that returns the string value of all private data members. See the examples of the processing for the details of the format of the toString method. Define a class DEP in a source file DEP.java that contains private data members: depts: A container that can store departments. It is an ArrayList of Department type. emps: A container that can store employees. It is an ArrayList of Employee type. projs: A container that can store projects. It is an ArrayList of Project type. works: A container that can store objects of works on. It is an ArrayList of WorksOn type. Implement Java methods in the file DEP.java that include: Default constructor that initialise values to all data members. Use the departments information provided below to add the objects of departments to the correct container. Use the employees information provided below to add the objects of employees to the correct container. Use the projects information provided below to add the objects of projects to the correct container. Display a menu that includes items below. 1. Display all departments. 2. Display all employees. 3. Display all projects. 4. Display information for employees who works on projects. 5. Add a record for an employee who works on a project. 0. Exit. The Java program gets an input number of the menu and processes the required method for that item until 0 is input.
  • 6. When item 1 is selected, the method displays all the department information. When item 2 is selected, the method displays all the employee information. When item 3 is selected, the method displays all project information. When item 4 is selected, the method displays all information for employees who works on projects. When item 5 is selected, the method gets inputs of employee number, project number and total hours that the employee works on the project. The method verifies input information: o If the employee exists, then save it to an employee object variable. o If the project exists, then save it to a project object variable. o If the employee has not been allocated to the project, input the total working hours. Save the works on information to the correct container. o Otherwise, the method returns to the caller. Testing data The data of departments, employees and projects are given below. Department: 1, "SALES", 110, 1234.00, "02/01/2012" 2, "ACCOUNTING", 120, 5566789.50, "30/10/2010" Employee: 600, "Willy", "01/01/1988", "41 Station Street, Wollongong, NSW 2500", "M", 250.5, 0, 9 700, "Zhi", "12/09/1999", "112 Smith Street, Windang, NSW 2525", "M", 80.2, 600, 9 Project: 1001, "Computation", "Microsoft", 8, 25000 1002, "Study methods", "Education committee", 3, 15000 Please also make a UML diagram of all the classes. Thanks!