I'm working on an assignment dealing with class inheritance and have everything done and working properly except for a string format method. The output of the program should look like this:

```
Base Salary Plus Commissioned Employee: Sue Smith with ssn: 222-22-2222
Gross Sales: $3000.00 
Commission Rate: 0.05 
with Base Salary:$300.00 
Earnings: $450.00

```

but it is printing like this:

```
Base Salary Plus Commissioned Employee: Sue Smith with ssn: 222-22-2222
Gross Sales: $3000.00 
Commission Rate: 0.05 
Earnings: $450.00
with Base Salary:$300.00 
Earnings: $450.00

```

The problem is that in the output, "Earnings: $450.00" is printing before "with Base Salary: $300.00". The class **BasePlusCommissionEmployee** extends from class **CommissionEmployee**. Each class has it's own **toString** method, and the BasePlusCommissionEmployee does call the super.toString(), which I believe this is causing the issue. 

I need to be able to have the class inherit from the CommissionEmployee but not bring the "Earnings" until the end (as shown). 

This is the code for the toString in the CommissionEmployee class:

```
    @Override
    public String toString() {                                    
        return String.format("%s: %s%n%s: $%.2f \n%s: %.2f \n%s $%.2f",    
         "Commissioned Employee", super.toString(),              
         "Gross Sales", getGrossSales(),                       
         "Commission Rate", getCommissionRate(), 
         "Earnings:", earnings());             
   }  

```

This is the code for the toString in BasePlusCommissionEmployee class (which extends from CommissionEmployee):

```
    @Override
    public String toString() {                                            
        return String.format("\n%s %s \n%s:$%,.2f \n%s $%.2f",                       
            "Base Salary Plus", super.toString(),                            
            "with Base Salary", getBaseSalary(),
            "Earnings:",earnings());                             
   }  

```

This is the test code running in the main:

```
CommissionEmployee employee1 = new CommissionEmployee("Fred", "Jones", "111-11-1111", 2000.0, .05);
BasePlusCommissionEmployee employee2 = new BasePlusCommissionEmployee("Sue", "Smith", "222-22-2222", 3000.0, .05, 300);
System.out.printf("%s%s%s%s%s", employee1, employee2, employee3, employee4, employee5);

```

All help is greatly appreciated! Thank you!