package UI;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import javax.sql.DataSource;
import org.postgresql.ds.PGSimpleDataSource;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import RDG.*;

/**
 *
 * @author Marcel
 */
public class SeatStuff {
    
    /**
    * Print free seats
    * @param class_id class where find free seats
    * @param aircraft_id  aircraft type where find free seats
    * @param flight_id flight where find free seats
    * @throws Exception
    */
    
    public static void printFree(Integer class_id, Integer aircraft_id, Integer flight_id) throws Exception{
        System.out.println("seat_id\tseat_number");
        var res=SeatCount.selectFree(class_id, aircraft_id, flight_id);
        for(String s:res.keySet()){
            System.out.println(s + "\t" + res.get(s));
        }
    }
}
