I have code that looks like this:
public Flight{
String code;
char status;
char type;
   Flight(String code, char status, char type){
    this.code = code;
    this.status = status;
    this.type = type;
   }
 }
public Menu{
 Flight flight1 = new Flight("DL123",'A','D');
 Flight flight2 = new Flight("DL146",'A','I');
 flightMap.put("DL123", flight1)
 flightMap.put("DL146", flight2)
 }
  if(schedule.flightMap.containsKey(decision))
  {
  }
If the user enters DL123 and containsKey returns true, I want to return only flight1's object attributes. How would I be able to do this? I've tried overwriting toString but because toString can only return as a String, I don't know how I'd return the status and type attributes which are characters.
Please ask if you need more information!
 
     
     
     
     
    