drawing class diagram, writing java

drawing class diagram

Write tests for each method (including getter and setter).


public class Person {

private String name;

public Person(String name){

[login to view URL] = name;


protected String getName(){

return name;




public class Employee extends Person{

public static final int PLUMBER = 1, ELECTRICIAN = 2, MECHANIC = 3;

private String employeeName;

private int employeeType;

private int hoursWorkedPerWeek;

public Employee(String employeeName, int employeeType, int hoursWorkedPerWeek){


[login to view URL] = employeeType;

[login to view URL] = hoursWorkedPerWeek;


public String getEmployeeName(){

return getName();


public int getEmployeeType(){

return employeeType;


public int getHoursWorkedPerWeek(){

return hoursWorkedPerWeek;




public class NewDate {

private int day;

private int month;

private int year;

public NewDate(int day, int month, int year) throws Exception{

if ((day < 1) || (day > 31) || (month < 1) || (month > 12) || (year < 1900) || (year > 2099))

throw new Exception("Illegal data");

[login to view URL] = day;

[login to view URL] = month;

this. year = year;


public String toString(){

return day + "/" + month + "/"+ year;




public class Project {

private String projectName;

private NewDate startDate;

private NewDate finishDate = null;

private Employee teamWorkingOnProject[];

private int numPeopleWorkingOnProject = 0;

public Project(String projectName, int startYear, int startMonth, int startDay, int sizeTeam) throws Exception{

[login to view URL] = projectName;

startDate = new NewDate(startDay, startMonth, startYear);

if (sizeTeam < 1){

throw new Exception("size of the team must be at least 1");


teamWorkingOnProject = new Employee[sizeTeam];


public void setFinishDate(NewDate finishDate){

[login to view URL] = finishDate;


public void addEmployeeToTeam(Employee newTeamMember){

if (finishDate == null){

teamWorkingOnProject[numPeopleWorkingOnProject] = newTeamMember;




public String getProjectNameAndStartDate(){

return "Project " + projectName + " started on " + [login to view URL]();


public String toString(){

String outputString;

double totalSalaryPaidPerWeek = 0.0;

double salaryOfEmployee;

int employeeType;

int hoursWorkedPerWeek;

if (finishDate == null){

outputString = getProjectNameAndStartDate() + "\n";

} else {

outputString = getProjectNameAndStartDate() + " and finished on "+ [login to view URL]() + "\n";


outputString += "The project has the following workers:\n";

for (int index = 0; index < numPeopleWorkingOnProject; index++){

outputString += teamWorkingOnProject[index].getEmployeeName() + "\n";

employeeType = teamWorkingOnProject[index]. getEmployeeType();

hoursWorkedPerWeek = teamWorkingOnProject[index]. getHoursWorkedPerWeek();

if (employeeType == [login to view URL]){

salaryOfEmployee = hoursWorkedPerWeek * 25.00;

} else if (employeeType == [login to view URL]){

salaryOfEmployee = hoursWorkedPerWeek * 30.00;

} else {

salaryOfEmployee = hoursWorkedPerWeek *20.00;


totalSalaryPaidPerWeek += salaryOfEmployee;


outputString += "The total salary paid to all employees working on the project is " +totalSalaryPaidPerWeek + "\n";

return outputString;



Beceriler: Java, Yazılım Mimarisi, JavaScript, C Programlama, UML Tasarımı

Daha fazlasını gör: java write class text file, write scrabble method java, drawing class diagram zend framework, sample java uml class diagram, write ppm method examples java, draw class diagram application java gui, class diagram game java, how to convert class diagram into java code, generate class diagram from java code online, generate class diagram from java code eclipse, generate class diagram from java code intellij, generate class diagram from java code netbeans, uml class diagram to java code, generate class diagram from java code, generate class diagram from java code intellij community edition, class diagram generator java, implementing class diagram in java, uml class diagram to java code example, how to convert class diagram to java code in staruml

İşveren Hakkında:
( 4 değerlendirme ) hamilton, Canada

Proje NO: #29892444



Hi there! I'm working with Java from 3 years and have experience with unit tests, so this job is fine for me. I'll be happy to help you with your problem! Best regards!

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% CAD
(0 Değerlendirme)

Bu iş için 4 freelancer ortalamada $24 teklif veriyor


Heyy I am java coder and I have experience of more than 5years.I have read your description and would like to work for you.I have already implemented many algorithms and developed many games and management systems usin Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% CAD
(32 Değerlendirme)

Hi i have read your requirements and i have understood your requirements clearly and I am ready to work with you kindly message me i am waiting for response let discuss more about it and start your work

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% CAD
(3 Değerlendirme)

Hey! My name is Daniel(but you can call me Lekrieg), are you using junit for the tests? I can do this in less than 4 days, I put this time time just to be sure that nothing go wrong. Message me if you want to discuss a Daha Fazla

$30 CAD in 4 gün içinde
(4 Değerlendirme)