Write another constructor for SoftwareEngineer. The construc…
Write another constructor for SoftwareEngineer. The constructor will take only a name and a company and set all instance variables appropriately. This constructor will be used for software engineers with $25000 who are paid $50/hr and are working on the “website” project for a company.
Read DetailsWrite a constructor for SoftwareEngineer. The constructor wi…
Write a constructor for SoftwareEngineer. The constructor will take the name, money, company, salary, and companyProject, and set all instance variables appropriately. Remember that you cannot directly assign to the variables in Worker, and that SoftwareEngineer is a child class.
Read DetailsConsider the below method. Provide two method headers: one t…
Consider the below method. Provide two method headers: one that overrides the given, and one that overloads it. private int foo(String str, double dbl) { // method body } Use this template for your answer (please type fully – you cannot copy): Overriding method header: [method header] Overloading method header: [method header]
Read DetailsWrite a concrete equals method for SoftwareEngineer. Two wor…
Write a concrete equals method for SoftwareEngineer. Two workers are equal if they have the same name, company, money, salary, and companyProject. You must call Worker’s equals and use its returned value for full credit. For this question, you are allowed to use getters for name, company, money, and salary for the partial credit alternative. You don’t need to implement the getters.
Read Details[2pts EXTRA CREDIT] Write a concrete toString method for Sof…
[2pts EXTRA CREDIT] Write a concrete toString method for SoftwareEngineer. The String representation of a SoftwareEngineer is: “My name is [name], and I work at [company]. I have $[money] and receive $[salary]/hr. I write software for [company]’s [companyProject]” (without the square brackets, replacing the square brackets with the values from the instance variables) Notice the prefix matches the toString from Worker (which ends in $[salary]/hr, and is marked). You must call Worker’s toString and use its returned value.
Read Details