Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

super() help

807607Dec 1 2006 — edited Dec 1 2006
I have a number of classes that extend each other, and in those classes i use super() in a method to get the data from another class. i am having problems with one of the classes and would like some help. below is part of the code from the classes:
public class Employee extends Person
{
	protected int id;
	protected Date start;
	protected float salary;
	
	public Employee()
	{
		super();
		id = 0;
		start = new Date(21,12,85);
		salary = 0;
		

	}
	

	public Employee(String nme, char sex, Date dob, int id, Date start)
	{
		super(nme, sex, dob);
		id = 0;
		start = new Date(1, 1, 1000);
		salary = 0;	
public class Person
{
	protected String name;
	protected char gender;
	protected Date dateOfBirth; 
	protected String address;
	protected String natInsceNo;
	protected String phoneNo;
	private static int counter = 0; 

	Person()
	{
	
		name = ""; 
		address = "";
		natInsceNo = "";

		
		dateOfBirth = new Date(28,03,85); 
		counter ++;
		
	}
	
	Person(String nme, char sex, Date dob) 
	{
		name = nme;
		gender = sex;
		dateOfBirth = dob;
		counter ++;
		

	}
public class Academic extends Employee
{ /
protected String department, roomNo;
protected int extension; 
protected int grade;

	public Academic()
	{
		super();
		department = "department";
		roomNo = "roomNo";
		extension = 0;
		grade = 0;

	}

	public Academic(String nme, char sex, Date dob, int id, Date start)
	{
		super(nme, sex, dob);
		department = "department";
		roomNo = "roomNo";
		extension = 0;
		grade = 0;
	}
The problem is when i compile Academic is comes up with this error:
Academic.java:19: cannot resolve symbol
symbol : consturctoe Employee (java.lang.String,char,Date)
location : class Employee
Super(nme,sex,dob);
^
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2006
Added on Dec 1 2006
4 comments
128 views