Flight Reservation System

hello guys can any expret help me to do my project the dead line is sunday
please help [email protected]
NOTE:the program is just simple input output throw ms-dos
thank you :D
Project Description
This project is about developing a software for flight reservation system. This program uses three classes Flight, RouteInfo and Passenger.
Flight class:
Instance variables
flight number
name of airline
day of flying
Constructor
Initializes instance variables
Methods
getFlightNumber()
getNameOfAirline()
getDayOfFlying()
setFlightNumber()
setNameOfAirline()
setDayOfFlying()
toString()
Passenger class:
Instance variables
computernumber
name
telephone
source
destination
day of Flying
Constructor
Initializes name and telephone
Methods
getName()
getID()
getSource()
getDestination()
getDayOfFlying()
setName()
setID()
setSource()
setDestination()
setDayOfFlying()
toString()
RouteInfo Class:
Instance variables
flight number
source
destination
Constructor
Initializes instance variables
Methods
getFlightNumber()
getSource()
getDestination()
setFlightNumber()
setSource()
setDestination()
toString()
The program reads the following information from the file Flight.txt and creates array of Flight objects and initializes it. This is a fixed array.
Flight.txt
SV707#Saudi Arabian Airlines#Friday
SV611#Saudi Arabian Airlines#Monday
SV555#Saudi Arabian Airlines#Saturday
GA111#Gulf Air#Tuesday
GA222#Gulf Air#Monday
GA333#Gulf Air#Wednesday
EA523#Egypt Air#Sunday
EA555#Egypt Air#Thursday
The program reads the following information from the file Routes.txt and creates array of RouteInfo objects and initializes it. (For simplicity, leave the item Time of flying)
Routes.txt
SV707#Dammam#Madina
SV707#Madina#Dammam
SV611#Madina#Jeddah
SV611 #Jeddah#Madina
SV555#Dammam#Jeddah
SV555#Jeddah#Dammam
GA111#Jeddah#Bahrain
GA111#Bahrain#Madina
GA222#Bahrain#Jeddah
GA222#Madina#Bahrain
GA333#Bahrain#Taif
GA333#Taif#Bahrain
EA523#Cairo#Madina
EA555#Madina#Cairo
The program has the following commands:
Command Purpose
s Search availability: This needs parameters: the day, source and destination, and list all the flights available for the given criteria.
For example:
To search all flights on Friday from dammam to madinah: s f dammam madinah
b Book a flight: This needs passenger info, source destination and day of flying, reserves the seat and generate a unique computer number if the seat is available. Modification done in Passenger array itself.
For example:
b Ali,Muhammad Hasan 050889977 dammam madinah f
means the system is trying to make a reservation for Muhammad Hasan Ali,
phone 050889977 from Dammam to madinah on Friday.
z List all passengers name (based on source & destination): This should List Flights name and passengers name based on given source & destination.
For example:
To know passengers who have booked in a flight SV707 from dammam madinah:
z sv707 dammam madinah
c Cancel Booking: This should cancel a booking by reading passenger info, source destination and day of flying OR by reading a computer number only. Modification done in Passenger array.
for example:
c 1234567
c Ali,Muhammad Hasan 050889977 dammam madinah f
t Add new route: This should add a new route in the RouteInfo array by reading flight number, source & destination. This new route also will be appended into the file Routes.txt
For example:
t SV555 Dammam Tabuk
f Add new Fleet: This should add a new entry in Flight array and will be appended into the file Flight.txt
For example:
f SV0285 Saudi Arabian Airlines; Wednesday
q Exit

hello guys can any expret help me to do my project
the dead line is sunday
please help [email protected]
well, I'll give you credit for a clever nick. But really - I'm working on almost the same thing here
http://www.answers.com/topic/global-air-transportation-execution-system
And I've got a deadline of July, but somehow I don't think the project manager would take it too well if I suggested that my plan should involve begging someone out on the java fora to do the project for me.
But come on - you have until Sunday! That's way longer than I had when I blew off my assignments in college, and I still managed to turn something in. Just pick up some caffeine and spend some time writing out things on paper and you'll get it, no worries. And if you run into specific coding troubles then post here and someone will likely help you out.
Good Luck
Lee

Similar Messages

  • Airline Reservation System with boolean Array

    Good morning,
    I have written the following code for an airline reservation system. The applet will assign the user a seat in either economy or first class. When first class is full, it will offer economy seats. This works - but when it is about to assign the last seat in 'economy', the program stops working. The error messages suggest a problem in the method call to selectSeat() in the 'economy' part of the code. I can't see the problem, though, as this code is identical to the code I used for the 'first class' part.
    //Airline booking
    //Coded by Eoghain on 16/9/07
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AirlineApplet extends JApplet implements ActionListener {
         JButton printPass;
         JTextArea outputArea;
         String output;
         int seatType, seatNum, choice;
         boolean[] seatArray = {false, false, false, false, false, false, false, false, false, false};
         public void init() {
              Container container = getContentPane();
              container.setLayout(new FlowLayout());
              chooseType();
              printPass = new JButton ("Click to print boarding pass");
              printPass.addActionListener(this);
              outputArea = new JTextArea(40, 40);
              container.add(printPass);
              container.add(outputArea);
         public void chooseType() {
              seatType = Integer.parseInt(JOptionPane.showInputDialog("Please type 1 first First Class or 2 for Economy"));
              selectSeat(seatType);
         public void actionPerformed(ActionEvent event) {
              outputArea.append(output);
              chooseType();
         public void selectSeat(int x) {
              //argument selects between first and economy
              if (x == 1)
                   if (seatArray[0] && seatArray[1] && seatArray[2] && seatArray[3] && seatArray[4])
                        choice = Integer.parseInt(JOptionPane.showInputDialog("There are no seats available in First Class. Would you like Economy? 1 for Yes, 2 for No."));
                        if (choice == 1)
                             selectSeat(2);
                        else
                             JOptionPane.showMessageDialog(null, "Next flight leaves in 3 hours.");
                   else
                   //do first stuff and make sure the seat is unoccupied
                   seatNum = (int)(Math.random()*5);
                        if (!seatArray[seatNum])
                             seatArray[seatNum] = true;
                        else
                             selectSeat(x);
                   output = "Your have seat " + seatNum + " in First Class. \n";
              else
                   if (seatArray[5] && seatArray[6] && seatArray[7] && seatArray[8] && seatArray[9])
                        JOptionPane.showMessageDialog(null, "There are no seats available in Economy. Sorry.");
                   else
                   //do economy stuff
                   seatNum = (5 + (int)(Math.random()*4));
                        if (!seatArray[seatNum])
                             seatArray[seatNum] = true;
                        else
                             selectSeat(x);
                   output = "Your have seat " + seatNum + " in Economy. \n";
    }Any advice would be greatly appreciated,
    -Eoghain

    You've created a nice little infinite loop in selectSeat here:
        if (!seatArray[seatNum])
            seatArray[seatNum] = true;
        else
            selectSeat(x);If you run out of 2nd class seats, your program isn't told to stop, it's told to just keep looking and looking and looking and looking and looking and looking and looking and looking and looking ...
    and so on. Don't do this.

  • Air ticket purchase/refund without external reservation system

    In the absence of external reservation systems what should be the suggested procedure in case of air ticket booking/ purchase and refund in case of cancellation?
    Thanks in advance!!

    Hi,
    This is not possible in SAP standard. Air ticket booking can only be made if you have a External GDS define in your system. Otherwise it is only possible to have documentary flight query using Travel Request but you can do a online flight query.
    Regards,
    Raynard

  • How to check connection from SAP to reservation system?

    Dear Experts,
    May I know how to check whether the connection between SAP and the reservation system has been set up and ready to use?
    Thanks.

    Hi
    You need to check the identification code issued to the enterprise by AMADEUS must be entered in the R/3 Customizing for Travel Planning under Master Data u2192 Control Parameters for Travel Planning u2192 Define sales offices and Define API access parameters.
    External reservation system In the Travel Planning subcomponent Travel Management accesses an external reservation system connected to R/3 to carry out the queries on available travel services and to book the selected services. The reservation system currently available is the AMADEUS Global Travel Distribution system.
    For more information, see Technical Prerequisites for Travel Planning--
    Technical Prerequisites for Travel Planning
    Before you can use Travel Planning fully, a number of internal R/3 and external prerequisites or settings must be fulfilled.
    Connection to an External Reservation System
    The online booking function in Travel Planning is based on the cooperation with external reservation systems that are used to communicate with the service providers. The R/3 user has access to the following functions via the connection to an external reservation system:
    u2022 Availability query of travel services
    u2022 Transfer of additional information about selected travel services
    u2022 Price information
    u2022 Processing of reservation by the respective provider
    u2022 Synchronization of the data in SAP Travel Planning if external booking changes have been made
    In the current release the external reservation system in use is AMADEUS Global Travel Distribution. AMADEUS is a subsidiary of Lufthansa, Air France, Continental Airlines and Iberia. The reservation system it provides is in worldwide use and 160,000 terminals in 37,000 travel agencies and ticket sales centers in over 130 countries are connected to it.
    In order to carry out online booking via AMADEUS the following must have been carried out:
    u2022 Your enterprise must have signed an agreement with AMADEUS for the use of the interface and be registered at AMADEUS with a user ID
    u2022 A network connection to the AMADEUS computer center must have been opened
    u2022 The identification code issued to the enterprise by AMADEUS must be entered in the R/3 Customizing for Travel Planning under Master Data u2192 Control Parameters for Travel Planning u2192 Define sales offices and Define API access parameters.
    For questions about registration, contact the SAP & AMADEUS Competence Center:
    SAP & AMADEUS Competence Center ACC 02 Neurottstrasse 16 69185 Walldorf Germany
    Cheers
    Mukta

  • Why isn`t the Apple Store Genius reservation system not working?

    Hello the apple store genius reservation system on Apple website is not working for Turkey.

    How would we know?  These are user to user forum.  We don't work for Apple

  • Airline Reservation System

    An Airline wants to design a reservation system based on the following conditions:
    �h Each Plane has capacity of 10 seats.
    �h Applet should display the following options at the top of applet window
    ��Please type 1 for ��Non-Smoking��
    ��Please type 2 for ��Smoking��
    Note: Types 1 and 2 are inputs and this will be accepted through a text field, if person types any wrong option type (other than 1 or 2), display a message at the status bar (last bottom line of window) that ��Invalid Input��.
    �h If a person types 1, program should assign a seat in the Non-Smoking section (seats 1 to 5) of the plane
    �h If a person types 2, program should assign a seat in the Smoking section (seats 6 to 10) of the plane
    �h Use a single dimensional array to represent the seating chart of the plane and initialize all the elements of array to 0 (zero) which indicates that all the seats are available.
    �h As each seat is assigned, set the corresponding element of array to 1 which indicates that this seat is no longer available.
    Note: After proper seat assignment, display message at the bottom line of window (status bar) , for example : ��Smoking Seat # 6�� OR ��Non-Smoking Seat # 2�� etc�K
    �h Program should never assign a seat that has already been assigned.
    �h When the Smoking section of Plane is full, Program should ask the person if it is acceptable to be placed in the non-smoking section and (vice versa as well)
    Note: Display message �� Smoking is full, Non-Smoking ?��
              �� Non-Smoking is full, Smoking ?��
    If answer to any of the above question is yes, make appropriate seat
    assignment in the program.
    If answer to any of the above question is No, display the message at the
    status bar of Applet window (very bottom of window) that ��Next Fight leaves
    in 3 hours��
    Some important points to consider
    1: As this is an applet program, it will have a full Graphical and Event handling capability.
    2: Your important GUI components (use all Swing classes for GUI) in this applet program are:
    a text field for input ( 1 or 2)
    two Labels to indicate the options to user (see above 2nd bullet)
    two buttons which will be pressed in response to the questions as mentioned
    above in bullet no. 8
    Note: Please note that when your applet will start, initially these buttons will not function (make these buttons as disabled). Make them active (enabled) when either section of plane (Smoking or non-smoking) is full and you generate a message as stated above in last bullet 8.
    3: When applet will start, both buttons will be disabled and only activity on applet window will be through the input field (where user can either input 1 or 2)
    4: Please note that input text field can also be registered for action event listener as you normally do for buttons, for example.
    Therefore, when you will type 1 or 2 in the input field and press <ENTER> key, based on the event handling process, proper seat will be assigned and message will be displayed on the status bar as mentioned above in bullet No. 6.
    5: Every message will always be displayed in the status bar of applet window (very bottom line of the window)
    6: In your HTML file, use Width and Height parameters both 200 pixels.

    How is this for a start
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Reserv extends JApplet implements ActionListener
         JTextField type   = new JTextField(1);
         JTextField status = new JTextField("");
         int        sits[] = new int[10];
         JLabel     lab1   = new JLabel("Please type 1 for Non-Smoking");
         JLabel     lab2   = new JLabel("Please type 2 for Smoking");
    public void init()
         getContentPane().setLayout(null);
         lab1.setBounds(5,10,190,21);
         lab2.setBounds(5,30,190,21);
         type.setBounds(200,30,20,21);
         type.addActionListener(this);
         getContentPane().add(lab1);
         getContentPane().add(lab2);
         getContentPane().add(type);
         status.setBounds(1,180,350,21);
         status.setBackground(Color.red);
         status.setForeground(Color.white);
         getContentPane().add(status);
         status.setEditable(false);
    public void actionPerformed(ActionEvent ae)
         status.setText("");
         if (type.getText().equals("1"))
    //          findNoSmoke();
              return;
         if (type.getText().equals("2"))
    //          findSmoke();
              return;
         status.setText("Invalid Input");     
    }Noah

  • To make an online interactive map that works with a reservation system which is the best application to use?

    I make campground maps and do interactive maps through a third-party program.  I want to use something in CC that I can make "hotspots" or id maps that I can interface with a reservation system to show availability.  I want the interactive map to work on both mobile and desktop.  What is my best program to download and use?
    I know html and css but have fallen in love with Muse. I am looking at the Edge Flow, Reflow and Edge Animate.  I just need some simple advice as I don't want to waste my time learning a program that doesn't do what I want...
    Thanks for any advice.

    When you do not have to have it connected to the external monitor, just use the MBP on only battery power.  Fastest would be to watch video or play a game.  Any CPU intensive application will use the battery faster that 'ordinary' use.
    Ciao.

  • Unknown error in reservation system (API error type A code 3)

    Good Day
    I hope someone can give me some info for the following error.
    I create a travel plan and when I click on Book I do some times get the following error
    "Unknown error in reservation system (API error type A code 3)"
    Can anyone please assist, as this does not always happens.
    Regards
    Jaco Nel

    MONO PKGBUILDs have a number of unique requirements. Have a look at some of the official ones, like Banshee itself, or F-spot, for example.

  • Is the reservation system launching at 10:00 local time or eastern time?

    Is the reservation system launching at 10:00 local time or eastern time?
    I heard that it would be realeased then. I don't want to be sitting around by my computer for the next hour. Even though I probably will anyways...

    According to this article: http://9to5mac.com/2012/09/24/apple-retail-scheduled-to-launch-personal-pickup-f or-iphone-5-tonight/, it's 10:00 Eastern.  If true, it should be live now.

  • Integration with Lotus Notes 8.5 - Room Reservation System to Add Approval Steps

    I have implemented several LiveCycle Forms with Some Workflow all
    based on XML and .NET. All working fine.
    Now, I have a new project (yet to be approved) which is to add
    Workflow and Approval Steps for Lotus Notes Room Reservation System.
    The current system on Lotus Notes, is out-of-the-box from Lotus, and
    it is working very well, and it has great repeat option to setup the
    required schedule to make the needed room reservation system.
    The user now requested to add some new features like add 2 more
    approval steps, and some new fields.
    I can modify the application in Lotus Notes, but this will creat a new
    problem. If there is new version coming for this system from Lotus
    Notes, then I will have to sync the modifications I did, and it will
    be a problem.
    I have put some screen shots to help understand what we are talking
    about:
    https://docs.google.com/leaf?id=0B97clwYte2SHYmUyZTRiZDEtZWRjZS00YmQ3LTg1MDUtM2MxNmYyYTIzM 2Ix&hl=en
    I have developed several programs in the past, I was able to connect
    to Lotus Notes Database from .NET.
    My plan is to develop the new Form in Adobe LC Desinger, with all the
    new required features, and connect to what ever existing functions/
    data to Lotus Notes (in both directions).
    The only thing I need help for is how to capture the Repeating
    Calendar Entry. I think this will take some effort. Becuase, once I
    capture all input parameters, I have to call a Web Service (in .NET)
    to get a list of Free Rooms to choose from.
    Here are my questions:
    1. Do you have any feedback on the above ?
    2. Any one has done any work to capture a repeating calendar entry in
    a PDF Form ?

    Hi Anil
    For Lotus notes integration with SAP solutions, pl check the following links:
    http://www.redbooks.ibm.com/redpieces/pdfs/redp4215.pdf
    http://www-306.ibm.com/software/info/ecatalog/en_US/products/Z262246B25186K14.html
    Best regards
    Ramki

  • Reservation System

    Hi,
    I am expanding my site and require a reservation system for each school play.
    I have made the table for the school play table:
    (play_id[pk], title, description) ETC
    I have made the relationship between the school play and the performance table:
    (perf_id[pk], play_id[fk], available_seating, ticket_price) ETC
    I have also made the relationship between the performance and the reservation table:
    (res_id[pk], per_id[fk], firstname, lastname, email, total_price) ETC
    I have seen many tutorials on how to create these relationships between tables, but there are not very much regarding how to display them with PHP.
    I need the following pages:
    List of school plays, with combined seating availability from all the performances.
    Booking page where the user selects the school play, the performance, and then reserves a seat. (This should also allow info about available seating to be displayed [from the performance table])
    Reservations page, where a list of reservations for the selected school play will appear.
    Any help would be greatly appreciated!
    Thank you
    ps.
    Sorry if it is not too clear.

    What am i doing wrong here?
    <?php
    //Connect to DB
    mysql_connect('X') or die('Could not connect: ' . mysql_error());
    mysql_select_db('') or die('Could not select database');
    $sql = "SELECT prod.title, prod.description, prod_perf.date
    FROM prod, prod_perf
    AS prod
    INNER JOIN prod_perf
    ON prod_perf.id = prod.performance_id";
    $result = $db->query($sql);
    while($row = $result->fetch_object()) {
    echo "{$row->title} ({$row->date})";
    ?>

  • What is the best/efficient DB Design for a device reservation system?

    Hi,
    I have to design table structure for a device reservation system. The user can reserve any device for a period of time (start time and end time). 
    Based on the reserved devices
    1) I need to show on the UI if the device is reserved or available
    2) for any logged in user, to reserve, how do I validate and check all the devices and allow the user to reserve the device
    with minimal logic
    Each reservation for a particular time for a device may be present as one record, when the user is reserving we have to consider the entire set of records to arrive at a conclusion whether the device is reserved or free for that particular amount of time.
    How do we do this with minimal logic and what is best db/table design for this kind of system.

    You may have a Users/Customers table (contains users personal info)
    You may have a Devices table (contains info about devices (name, supplier and etc))
    You may have a reservation table that contains a userid + deviceid + startdate + end date+ quantity...
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Online Reservation System !

    Hi has anyone in here done any project or program on an Online Reservation System ..? i will need some advice or if posible to share some experience..with me.or if anyone has good links to such information..pls let me know.
    Thanks.

    Anything specific you're looking for? If not, I'd start with thinking about the architecture of the whole thing, and just get an idea of HOW you want to start going about this project. Think about the different layers and how you want them to interact with each other. Sun has some good tutorials for web applications (http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html); what you learn from there could easily be applied to an online reservation system.
    If you run into specific problems, these forums are a great place to post code and get advice.
    HTH :o)

  • 4s reservation system, no pick up dates???

    finally got into the iphone 4s reservation system to reserve a phone..  It lets me choose my store and pick a phone.. And then in the final step in the process it says there are no pick up dates available for my location... Although the system lets you select that location   What gives?

    Same here.  I think it's just a tease--a few nights ago the website was just broken.  Then I could access the site but it wouldn't let me select which store I wanted to pick up.  The night after I could select the store but there were no phones.  And now I can finally select a phone to reserve but there are no pick up dates available...

  • Anyone can connect to reservation system for iphone5?

    Anyone can connect to reservation system for iphone5?

    I can select the store, choose the phone and fill in my details. But whenever I try to click the submit button nothing* happens.Seems like the servers are not available.
    * There is a JavaScript error: Object doesn't support this property or method. (ReservationRequest.js)

Maybe you are looking for

  • Apple ID for Enterprise

    Hello, I work at a large organization and we are interested in using iPads for certain business functions. Currently we have a few in the environment. The Apple IDs for these devices are personal ones that belong to the user who it is assigned to. We

  • USB device not recognized until reboot

    Hi my G61 110 SA notebook fails to load drivers for any usb device, including Iphone 4, until i reboot. i have tried uninstalling all usb devices in the Device Manager, and allowing windows 7 SP1 to reload them, but this does not help. Any suggestion

  • ITunes 6.0.2 shows incorrect track lengths, clips track when playing

    I just upgraded to iTunes 6.0.2. In previous versions, iTunes would often show incorrect track lengths on longer tracks, but would play them all the way through, with the time remaining staying at 0:00 until the track finished playing. This new versi

  • Customer id:0328990515 My laptop has problem and has to be refreshed and to re-install adobe photosh

    customer id no 0328990515 my laptop has problem and has to be refreshed and to re-install the adobe photoshop cs6 extended. But after running the "initalling installer", nothing happened. Cannot re-install the adobe photoshop cs6 extended. Need urgen

  • Thunderbold with Macbook pro 13 some programs doesn't function properly

    I have a macbook pro 13 early 2011 that I connect to my thunderbold 27 display. The problem I have is that some programs don't function properly. For instance, in the doxy pro software I can't select any of the options under(over) the send menu optio