// File: AircraftFactory.java
// T Balls : Dec 1999
// "Build" aircraft and save as data files
package gui2000;
import java.io.*;
import java.util.*;
class DataGen1
{ public static void main( String[] args )
{ Vector v = new Vector();
// ID East North Head Height Speed CLimbR TurnR SecI ID2
v.add( new Aircraft( "3351", +25000, +25000, 225, 22000, 600, 35, 5, -1, "3351" ) );
v.add( new Aircraft( "3352", -25000, +25000, 135, 20000, 600, 35, 5, -1, "3352" ) );
v.add( new Aircraft( "3353", +25000, -25000, 315, 18000, 600, 35, 5, -1, "3353" ) );
v.add( new Aircraft( "3354", -25000, -25000, 45, 16000, 600, 35, 5, -1, "3354" ) );
v.add( new Aircraft( "1234", -25000, 0, 90, 12000, 540, 50, 10, -1, "1234" ) );
v.add( new Aircraft( "4567", 0, +15000, 180, 32000, 650, 60, 13, -1, "4567" ) );
try
{ FileOutputStream fos = new FileOutputStream( "gui2000/DataFile1.dat" );
ObjectOutputStream oos = new ObjectOutputStream( fos );
oos.writeObject( v );
oos.close();
}
catch( Exception e )
{ e.printStackTrace();
}
}
}
class DataGen2
{ public static void main( String[] args )
{ Vector v = new Vector();
// ID East North Head Height Speed CLimbR TurnR SecI ID2
v.add( new Aircraft( "3351", +26000, +26000, 200, 22000, 600, 35, 5, -1, "3351" ) );
v.add( new Aircraft( "3231", -25000, +12100, 120, 12000, 540, 50, 10, -1, "3231" ) );
v.add( new Aircraft( "2543", 0, +15000, 175, 32000, 650, 60, 13, -1, "2543" ) );
v.add( new Aircraft( "6455", 0, -10000, 8, 20000, 575, 50, 10, 30, "7600" ) );
v.add( new Aircraft( "6456", +6000, 0, 300, 18000, 475, 40, 8, -1, "6456" ) );
v.add( new Aircraft( "4455", +5000, -50, 350, 20000, 525, 50, 10, 50, "7700" ) );
v.add( new Aircraft( "6764", +25000, -15000, 320, 24000, 555, 30, 20, -1, "6764" ) );
v.add( new Aircraft( "6765", -25000, -12500, 95, 22000, 550, 40, 10, -1, "6765" ) );
try
{ FileOutputStream fos = new FileOutputStream( "gui2000/DataFile2.dat" );
ObjectOutputStream oos = new ObjectOutputStream( fos );
oos.writeObject( v );
oos.close();
}
catch( Exception e )
{ e.printStackTrace();
}
}
}
class DataGen3
{ public static void main( String[] args )
{ Vector v = new Vector();
// ID East North Head Height Speed CLimbR TurnR SecI ID2
v.add( new Aircraft( "3651", 15000, 10000, 0, 25000, 630, 35, 5, -1, "3651" ) );
v.add( new Aircraft( "4231", -10000, +12100, 180, 8000, 540, 60, 10, -1, "4231" ) );
v.add( new Aircraft( "2543", 0, -5000, 180, 30000, 500, 60, 10, 30, "7600" ) );
v.add( new Aircraft( "6451", +5000, -10000, 270, 30040, 500, 50, 10, -1, "6451" ) );
try
{ FileOutputStream fos = new FileOutputStream( "gui2000/DataFile3.dat" );
ObjectOutputStream oos = new ObjectOutputStream( fos );
oos.writeObject( v );
oos.close();
}
catch( Exception e )
{ e.printStackTrace();
}
}
}
|