Working with a 3D sparse table

I am fairly new to Java's data structures and I have to use a 3D sparse table to add flight objects and link them to the "right" according to the flight times (total of 17 hours) (06:00, 07:00, ..., 23:00), link "down" according to destination (BFN to UTN), and also link according to the boarding gates in the third dimension (“next” reference). There are 6 boarding gates (A1, A2, B1, B2, C1, C2) and 12 destinations (can use any abbreviations - eg. "JNB", etc). The following is my Flight Class:

/* Flight attributes: */
private String code; // unique flight code - can be any string value
// Add more variables if necessary  

public Flight down; // The next flight (down) going to the same destination.
public Flight right;// The next flight (right) departing at the same time.
public Flight next; // The next flight (next) boarding at the same gate.

public String gate;
public String departure;
public String destination;

public Flight(String code_)
    /* you may add additional constructors. */

           this.code = code_;
            down = null;
            right = null;
            next = null;
     public Flight(String destination, String departure, String gate, String code){

         this.destination = destination;
         this.departure = departure;
         this.gate = gate;
         this.code = code;


public void setCode(String code_) 
        this.code = code_;

    /* Implement this method to set the code of this flight (eg. SA123 - typically, each flight gets a unique code) */

public String getCode() 
    /* This method returns the code of this flight */
    return code;

The following is a representation of the sparse tabale:

Representation of the sparse table

I am trying to work on the following Flight Schedule class which represents the sparse table and it should allow for insertion of Flight objects, the class looks as follows:

public class FlightSchedule

public FlightSchedule()
    /*additional constructors may be added*/


/* Insertion */
public void addFlight(String destination, String departure, String gate, String code)
    /* Insert a Flight object according to its destination, departure time and boarding gate.
         The Flight object has to be initialised with the code parameter.
       all flights departing at the same time must be sorted in alphabetical order according to their destination codes */


/* Deletion */
public Flight deleteFlight(String destination, String departure)
    /* Remove and return the flight corresponding to the given parameters from the schedule. */
    return null;

I am extremely confused on how to start with the constructor and how to begin with the addFlight function.