alwaysAnewbie
Programmer
I have constructor Player and constructor Owner in their respective classes. In constructor Owner I have a method (addRosterPlayer)i need to pass an instance of constructor Player. I have imported the entire package into both but class Owner will not compile. The error is "cannot resolve symbol" on method addRosterPlayer(Player p). Any idea what I'm missing here? (Yes I have RTFM'ed I'm just not getting it)
Class Player code
Class Owner code
Thanks for your help.
Class Player code
Code:
package draft;
import draft.*;
public class Player {
String f_name;
String l_name;
String pro_team;
String position;
int player_id;
public Player(String fn, String ln, String team, String pos, int id) {
l_name = ln;
f_name = fn;
pro_team = team;
position = pos;
player_id = id;
}
public void addDraftListPlayer(Player p) {
}
}
Class Owner code
Code:
package draft;
import draft.*;
public class Owner {
String f_name;
String l_name;
int team_id;
int league_id;
String team_name;
public Owner(String fn, String ln, int team, String tn, int league) {
l_name = ln;
f_name = fn;
team_name = tn;
team_id = team;
league_id = league;
}
public String getTeamName() {
return this.team_name;
}
public void addRosterPlayer(Player p) {
}
}
Thanks for your help.