Could someone review this code and tell me why I get no result please. public cl
ID: 3696811 • Letter: C
Question
Could someone review this code and tell me why I get no result please. public class CommissionEmployee { private String firstName; private String lastName; private String socialSecurityNumber; private double grossSales; private double commissionRate; public CommissionEmployee(String firstName, String lastName, String socialSecurityNumber, String string, double commissionRate) { this.firstName = firstName; this.lastName = lastName; this.socialSecurityNumber = socialSecurityNumber; this.grossSales = grossSales; this.commissionRate = commissionRate; } public String getFirstName(){ return firstName; } public String getLastName(){ return lastName; } public String getSocialSecurityNumber() { return socialSecurityNumber; } public double getGrossSales() { return grossSales; } public double getCommissionRate() { return commissionRate; } }
Explanation / Answer
public void setLastName( String last )
{
lastName = last;
} // end method setLastName
{ public abstract class Employee
{
private String firstName;
private String lastName;
private String socialSecurityNumber;
// three-argument constructor
public Employee( String first, String last, String ssn )
{
firstName = first;
lastName = last;
socialSecurityNumber = ssn;
} // end three-argument Employee constructor
// set first name
public void setFirstName( String first )
{
firstName = first;
} // end method setFirstName
// return first name
public String getFirstName()
{
return firstName;
} // end method getFirstName
// set last name
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.