SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
I have already implement the Department, Employee, Project and WorksOn classes.
Here is the Department class:
import java.util.*;
public class Department {
private int dNumber;
private String dName;
private int manager; // Private data members
private double budget;
private String startDate;
public Department(int dNumber, String dName, int manager, double budget, String startDate)
{ // Parameterized Constructor for Department
this.dNumber = dNumber;
this.dName = dName;
this.manager = manager;
this.budget = budget;
this.startDate = startDate;
}
@Override
public String toString() { // toString method for returning values
return String.format("%d, %s, %d, %.2f, %s", dNumber, dName, manager, budget,
startDate);
}
}
Here is the Employee class:
import java.util.*;
public class Employee {
private int eNumber;
private String eName;
private String dob;
private String address; // Private data members
private String gender;
private double salary;
private int supervisor;
private int dNumber;
public Employee(int eNumber, String eName, String dob, String address, String gender,
double salary, int supervisor, int dNumber) { // Parameterized Constructor for Employee
this.eNumber = eNumber;
this.eName = eName;
this.dob = dob;
this.address = address;
this.gender = gender;
this.salary = salary;
this.supervisor = supervisor;
this.dNumber = dNumber;
}
public int dNumber() { // public method getNumber() for returning Employee Number
return dNumber;
}
@Override
public String toString() {// toString method for returning values
return String.format("%d, %s, %s, %s, %s, %.2f, %d, %d", eNumber, eName, dob,
address, gender, salary, supervisor, dNumber);
}
}
Here is the Project class:
import java.util.*;
public class Project {
private long pNumber;
private String title;
private String sponsor; // Private data members
private int dNumber;
private double budget;
public Project(long pNumber, String title, String sponsor, int dNumber, double budget) { //
Parametzied Constructor for Project
this.pNumber = pNumber;
this.title = title;
this.sponsor = sponsor;
this.dNumber = dNumber;
this. budget = budget;
}
public long getNumber() { // public method getNumber() for returning Project Number
return pNumber;
}
public String toString() { // toString method for returning values
return String.format("%d, %s, %s, %d, %.2f", pNumber, title, sponsor, dNumber, budget);
}
}
Lastly, heres the WorksOn class:
import java.util.*;
public class WorksOn {
private Project proj;
private Employee emp; // Private data members
private int hours;
public WorksOn(Project proj, Employee emp, int hours) { // Parameterized Constructor for
WorksOn
this.proj = proj;
this.emp = emp;
this.hours = hours;
}
@Override
public String toString() { // toString method for returning values
return String.format("%s, %s, %d", proj, emp, hours);
}
}
I need help with the DEP class for java. Below are the instructions:
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"
Employee: 600, "Willy", "01/01/1988", "41 Station Street, Wollongong, NSW 2500", "M",
250.5, 0, 9
Project: 1001, "Computation", "Microsoft", 8, 25000
Please include ALL code

Mais conteúdo relacionado

Semelhante a I have already implement the Department, Employee, Project and Wor.pdf

enum_comp_exercicio01.docx
enum_comp_exercicio01.docxenum_comp_exercicio01.docx
enum_comp_exercicio01.docxMichel Valentim
 
Please I am posting the fifth time and hoping to get this r.pdf
Please I am posting the fifth time and hoping to get this r.pdfPlease I am posting the fifth time and hoping to get this r.pdf
Please I am posting the fifth time and hoping to get this r.pdfankit11134
 
CMPSC 122 Project 1 Back End Report
CMPSC 122 Project 1 Back End ReportCMPSC 122 Project 1 Back End Report
CMPSC 122 Project 1 Back End ReportMatthew Zackschewski
 
Should be in JavaInterface Worker should extend Serializable from .pdf
Should be in JavaInterface Worker should extend Serializable from .pdfShould be in JavaInterface Worker should extend Serializable from .pdf
Should be in JavaInterface Worker should extend Serializable from .pdffashionscollect
 
C++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfC++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfjaipur2
 
First compile all the classes.But to run the program we have to run .pdf
First compile all the classes.But to run the program we have to run .pdfFirst compile all the classes.But to run the program we have to run .pdf
First compile all the classes.But to run the program we have to run .pdfaoneonlinestore1
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingSyed Faizan Hassan
 
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxINTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxnormanibarber20063
 
I am trying to fill out a program where the method definitions will b.docx
I am trying  to fill out a program where the method definitions will b.docxI am trying  to fill out a program where the method definitions will b.docx
I am trying to fill out a program where the method definitions will b.docxPhil4IDBrownh
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiMuhammed Thanveer M
 
Refactoring Tips by Martin Fowler
Refactoring Tips by Martin FowlerRefactoring Tips by Martin Fowler
Refactoring Tips by Martin FowlerIgor Crvenov
 
Class & Objects in JAVA.ppt
Class & Objects in JAVA.pptClass & Objects in JAVA.ppt
Class & Objects in JAVA.pptRohitPaul71
 
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.docxhoney690131
 
Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfdhavalbl38
 
Java căn bản - Chapter4
Java căn bản - Chapter4Java căn bản - Chapter4
Java căn bản - Chapter4Vince Vo
 

Semelhante a I have already implement the Department, Employee, Project and Wor.pdf (20)

Numerical data.
Numerical data.Numerical data.
Numerical data.
 
enum_comp_exercicio01.docx
enum_comp_exercicio01.docxenum_comp_exercicio01.docx
enum_comp_exercicio01.docx
 
Please I am posting the fifth time and hoping to get this r.pdf
Please I am posting the fifth time and hoping to get this r.pdfPlease I am posting the fifth time and hoping to get this r.pdf
Please I am posting the fifth time and hoping to get this r.pdf
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
CMPSC 122 Project 1 Back End Report
CMPSC 122 Project 1 Back End ReportCMPSC 122 Project 1 Back End Report
CMPSC 122 Project 1 Back End Report
 
Should be in JavaInterface Worker should extend Serializable from .pdf
Should be in JavaInterface Worker should extend Serializable from .pdfShould be in JavaInterface Worker should extend Serializable from .pdf
Should be in JavaInterface Worker should extend Serializable from .pdf
 
C++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfC++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdf
 
OOPS 22-23 (1).pptx
OOPS 22-23 (1).pptxOOPS 22-23 (1).pptx
OOPS 22-23 (1).pptx
 
First compile all the classes.But to run the program we have to run .pdf
First compile all the classes.But to run the program we have to run .pdfFirst compile all the classes.But to run the program we have to run .pdf
First compile all the classes.But to run the program we have to run .pdf
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programming
 
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxINTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
 
I am trying to fill out a program where the method definitions will b.docx
I am trying  to fill out a program where the method definitions will b.docxI am trying  to fill out a program where the method definitions will b.docx
I am trying to fill out a program where the method definitions will b.docx
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
 
Refactoring Tips by Martin Fowler
Refactoring Tips by Martin FowlerRefactoring Tips by Martin Fowler
Refactoring Tips by Martin Fowler
 
Class & Objects in JAVA.ppt
Class & Objects in JAVA.pptClass & Objects in JAVA.ppt
Class & Objects in JAVA.ppt
 
3. Polymorphism.pptx
3. Polymorphism.pptx3. Polymorphism.pptx
3. Polymorphism.pptx
 
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
 
Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdf
 
Java căn bản - Chapter4
Java căn bản - Chapter4Java căn bản - Chapter4
Java căn bản - Chapter4
 

Mais de aggarwalshoppe14

I am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfI am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfaggarwalshoppe14
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfaggarwalshoppe14
 
I receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfI receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfaggarwalshoppe14
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfaggarwalshoppe14
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfaggarwalshoppe14
 
I need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfI need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfaggarwalshoppe14
 
I need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfI need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfaggarwalshoppe14
 
His Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfHis Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfaggarwalshoppe14
 
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfHIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfaggarwalshoppe14
 
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfHile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfaggarwalshoppe14
 
Hi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfHi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfaggarwalshoppe14
 
Hi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfHi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfaggarwalshoppe14
 
HHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfHHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfaggarwalshoppe14
 
Hello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfHello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfaggarwalshoppe14
 
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfHealth Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfaggarwalshoppe14
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfaggarwalshoppe14
 
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfHere is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfaggarwalshoppe14
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfaggarwalshoppe14
 
help write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfhelp write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfaggarwalshoppe14
 
I need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfI need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfaggarwalshoppe14
 

Mais de aggarwalshoppe14 (20)

I am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfI am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdf
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdf
 
I receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfI receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdf
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdf
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
 
I need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfI need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdf
 
I need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfI need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdf
 
His Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfHis Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdf
 
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfHIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
 
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfHile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
 
Hi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfHi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdf
 
Hi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfHi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdf
 
HHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfHHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdf
 
Hello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfHello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdf
 
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfHealth Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
 
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfHere is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdf
 
help write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfhelp write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdf
 
I need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfI need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdf
 

Último

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Último (20)

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

I have already implement the Department, Employee, Project and Wor.pdf

  • 1. I have already implement the Department, Employee, Project and WorksOn classes. Here is the Department class: import java.util.*; public class Department { private int dNumber; private String dName; private int manager; // Private data members private double budget; private String startDate; public Department(int dNumber, String dName, int manager, double budget, String startDate) { // Parameterized Constructor for Department this.dNumber = dNumber; this.dName = dName; this.manager = manager; this.budget = budget; this.startDate = startDate; } @Override public String toString() { // toString method for returning values return String.format("%d, %s, %d, %.2f, %s", dNumber, dName, manager, budget, startDate); } } Here is the Employee class: import java.util.*; public class Employee { private int eNumber;
  • 2. private String eName; private String dob; private String address; // Private data members private String gender; private double salary; private int supervisor; private int dNumber; public Employee(int eNumber, String eName, String dob, String address, String gender, double salary, int supervisor, int dNumber) { // Parameterized Constructor for Employee this.eNumber = eNumber; this.eName = eName; this.dob = dob; this.address = address; this.gender = gender; this.salary = salary; this.supervisor = supervisor; this.dNumber = dNumber; } public int dNumber() { // public method getNumber() for returning Employee Number return dNumber; } @Override public String toString() {// toString method for returning values return String.format("%d, %s, %s, %s, %s, %.2f, %d, %d", eNumber, eName, dob, address, gender, salary, supervisor, dNumber); } } Here is the Project class: import java.util.*; public class Project { private long pNumber; private String title; private String sponsor; // Private data members
  • 3. private int dNumber; private double budget; public Project(long pNumber, String title, String sponsor, int dNumber, double budget) { // Parametzied Constructor for Project this.pNumber = pNumber; this.title = title; this.sponsor = sponsor; this.dNumber = dNumber; this. budget = budget; } public long getNumber() { // public method getNumber() for returning Project Number return pNumber; } public String toString() { // toString method for returning values return String.format("%d, %s, %s, %d, %.2f", pNumber, title, sponsor, dNumber, budget); } } Lastly, heres the WorksOn class: import java.util.*; public class WorksOn { private Project proj; private Employee emp; // Private data members private int hours; public WorksOn(Project proj, Employee emp, int hours) { // Parameterized Constructor for WorksOn this.proj = proj; this.emp = emp; this.hours = hours; }
  • 4. @Override public String toString() { // toString method for returning values return String.format("%s, %s, %d", proj, emp, hours); } } I need help with the DEP class for java. Below are the instructions: 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.
  • 5. 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" Employee: 600, "Willy", "01/01/1988", "41 Station Street, Wollongong, NSW 2500", "M", 250.5, 0, 9 Project: 1001, "Computation", "Microsoft", 8, 25000 Please include ALL code