נשלח בתאריך: 19 April 2009 בשעה 21:44 | | IP רשוּם
|
|
|
|
הקוד הוא
public boolean addRaceDriverToArray(String licenseNumber, String fullName,String nationality,Date dateOfBirth,String team, int worldChampionships,int totalScore, int highestRaceFinish) {
//TODO this method
if(driversArr.length<MAX_ARRAYS_LENGTH)
{
for(int i=current_Length_Driver_Array;i<MAX_ARRAYS_LENGTH;i++)
if(driversArr[i]==null)
{
driversArr[i].setLicenseNumber(licenseNumber);
driversArr[i].setFullName(fullName);
driversArr[i].setDateOfBirth(dateOfBirth);
driversArr[i].setNationality(nationality);
driversArr[i].SetSkillLevel();
driversArr[i].setTotalScore(totalScore);
driversArr[i].setTeam(team);
driversArr[i].setWorldChampionships(worldChampionships);
driversArr[i].setHighestRaceFinish(highestRaceFinish);
current_Length_Driver_Array++;
return true;
}
}
return false
{
המערך אינו קולט כלום מה הבעיה?
|