I think I need to look up the race id, then remove the car and driver that were assigned to that flight. Then I should remove the race. Any ideas?
private void crash()
{
System.out.println("Crash");
Race race = races.find(races.readId("Race"));
races.removeRace(race);
// this works up to this point and removes the race from the LinkedList
// but I am not sure how to find the driver or car, that were registered into the race, removed.
// Only the race id is entered and the race, driver and car are then all removed.
Car car = cars.find("Car"));
cars.removeCar(car);
drivers.removeDriver(driver);
menu();
}

New Topic/Question
Reply




MultiQuote







|