super schmuper

can someone tell me what is wrong with my super statement?

The problem is in the ITEmployee Class. I have bolded and underlined the error statement. The error states that it cannot find symbol SalariedEmployee constructor.I have also included a copy of the SalariedEmployee class constructor. If you need more info please let me know. Thanks.

publicclass SalariedEmployeeextends Employee

{

privatedouble weeklySalary;

/** Creates a new instance of SalariedEmployee */

public SalariedEmployee(String name, String address, String ssn,

String id,double ysalary,

double hours,int payrate,double weeklypay)

{

super(name, address, ssn, id, ysalary);

setWeeklySalary(ysalary);

/*

* ITEmployee.java

*

* Created on April 30, 2007, 11:59 PM

*

* To change this template, choose Tools | Template Manager

* and open the template in the editor.

*/

/**

*

* @author P

*/

publicclass ITEmployeeextends SalariedEmployee{

private String degree;

private String certificates;

private String progLang;

/** Creates a new instance of ITEmployee */

public ITEmployee(String name, String address, String ssn,

String id,double ysalary,

double hours,int payrate,double weeklypay,

String aDegree, String aCert, String aProgLang)

{

[b][u]super(name, address, ssn, id, ysalary, weeklypay);[/u][/b]

degree = aDegree;

certificates = aCert;

progLang = aProgLang;

System.out.println("ITEmployee object has been constructed");

}

}

[2741 byte] By [pberardi1a] at [2007-11-27 3:07:52]
# 1
Just glancing at the code, SalariedEmployee's constructor takes eight arguments and you are only passing six.
DrLaszloJamfa at 2007-7-12 3:55:26 > top of Java-index,Java Essentials,New To Java...
# 2
Thats because SalariedEmployee does not have a constructor with the following signature:SalariedEmployee(String, String, String, String, double, double)which you are calling from your ITEmployee constructor.
prometheuzza at 2007-7-12 3:55:26 > top of Java-index,Java Essentials,New To Java...
# 3

I put this in for the super

super(String name, String address, String ssn,

String id, double ysalary,

double hours, int payrate, double weeklypay);

and now i get a class expected error

what should it be?

pberardi1a at 2007-7-12 3:55:26 > top of Java-index,Java Essentials,New To Java...
# 4

Your syntax was okay the first time, you just weren't passing enough arguments.

Why are you including the types now in the call to super(...). You must know that's the wrong syntax:

super(name, address, ssn, id, ysalary, hours, payrate, weeklypay);

DrLaszloJamfa at 2007-7-12 3:55:26 > top of Java-index,Java Essentials,New To Java...
# 5
This worked! Thank you !super( name, address, ssn, id, ysalary, hours, payrate, weeklypay);
pberardi1a at 2007-7-12 3:55:26 > top of Java-index,Java Essentials,New To Java...