The Artima Developer Community
Sponsored Link

Java Answers Forum
My Project

18 replies on 2 pages. Most recent reply: Jun 12, 2009 12:48 AM by Vincent O'Sullivan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 18 replies on 2 pages [ 1 2 | » ]
Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

My Project Posted: May 31, 2009 9:48 AM
Reply to this message Reply
Advertisement
Hi everyone ,
I am a nwe member with you hopeflly you get something new from me and so I .
i have a project in my unversity i hope you help me on that my projet is ::



Introduction
The idea of this project is to build an Airline Reservation System, that facilitate reserve and book domestic and international flight (Virtually).

Phase 1:
Write a java program the ask for the username and password in JOptionPane dialogue. If the username and password are correct let the user start entering commands that do the following Functions:

1- City Encoding and Decoding: In the function you have to build a static function that return takes a city code or name and return the city airport details information taken from the following file as a dataset: http://www.kovrik.com/sib/travel/iata-airport-codes.txt

Sample:
> dan Jeddah
Airport Code : JED Jeddah [King Abdul Aziz Airport], Saudi Arabia
>
2- Make a new reservation: In this function the user will enter the following command:
>res jeddmm14apr/2y/alali;mohammed ali/alali;sami ali
Once the user type the above command the function res should be called with the String input parameter " jeddmm14may/2y/alali;mohammed ali/alali;sami ali"
The function should automatically generate a unique reservation number of 8 digits and store the following reservation detail in a file named with the reservation number if there is availability in the availability flight files (which will be explained later) otherwise return No available flight to the user:
Departure City: JED
Destination City: DMM
Day: 14
Months: April
Year: 2010 //Note: the user doesn't have to enter the year because booking is only valid for the coming 12 months. E.g we are now in May 2009 so, booking is valid from May 2009 till April 2010
Class: Y
Number of seats: 2 //Note: 2y means 2 seats on the Y class. e.g. 1y means 1 seat on the Y class
Passenger 1:
Last Name: alali
Given Name: mohammed ali
Passenger 2:
Last Name: alali
Given Name: sami ali
3- A function to restore a booking details: The user should enter the following command in order to retrieve a reservation details:
>Ret 00001122
the function Ret should be called with the reservation number and then reads the file 00001122 and print its detail on the screen.

4- Modify booking:
>mod 00001122 followed by parameter needs to be modified code and the new value as follows:
cmed //means change the departure city to MED
diad //means change the destination city to IAD
r2 //means remove the second passenger and update the number of seats booked, similarly r1 will cancel the first passenger
p1bahjat;ahmedabdullah //means change the first passenger to bahjat;ahmedabdullah
gf //means change the class to First class
similarly gj change to business class and gy change to Y (Economy) class
t16 //means change the day to 16
mMay //means change the month to May
Note: For simplicity we remove the time from all reservations assuming there will be only one flight each day in each city pair.
Sample valid commands:
>mod 00001122 cmed;diad;gf //change departure city to MED ,destination to IAD and upgrade to First class
>mod 00001122 ddmm //change destination to DMM
>mod 00001122 ddmm;t19 //change destination to DMM and day 16
5- Add flight to Schedule: In this function you can add a flight details as follows:
>Add jedpar**May009F020J199Y
The above command should work as follows:
Add 30 flights(means 30 lines) (** means all days in May assuming every month is 30 days)
Each line will consist of the following details:
01 May JED PAR 009F 020J 199Y //this line means in 1st of May there will be a flight from JED to PAR and it has the following seats details: 9 seats on the first class, 20 seats on business class and 199 seats on Economy class
the line will be repeated for the 30 days of may from JED to PAR automatically so you availability.txt file should now consist of 30 lines. And it must be updated each time you make a new reservation from JED to PAR.
6- Schedule and Availability: In order to check the schedule and availability in a specific date between specific pair the user should enter the following command:
>Ava 15mayjedpar
This command should call function availability with a string parameter "15mayjedpar"
The function should print to the screen the available flight details taken from a file availability.txt maintained by the function on part 5 above.
The output of this function should be as follows:
15 May JED PAR 009F 020J 199Y

7- Exit: the user should write q! to exit from the system. Note that your application should run infinitely accepting user commands until the user issue the exit command.
8- You should output an error message for wrong input. E.g
>asdfasf
Wrong command




Phase 2:
Write a Ticket class with the following:
a- attributes:
PassengerName, mobile , reservationNumber, eTKT_Number,departure,destination,price.
Note: TKT number should be auto generated 16 digit number starts by 065210 which refer to airline code.
b- The class should have a constructor with all attributes.
c- Getters and setters.
d- Method print_Reservation:
This method should print the PNR(Passenger Name Record) for the current reservation which contains all the attributes plus the total price.
e- Get ticket detail for a file: this method should take a 16 digit ticket number
f- Method print ticket details
g- Method store ticket: this method should store the ticket details in a database file where all tickets details are stored. (assume file name is tkt.txt)
h- Link your class with the application built in Phase 1 by the following command:
>tkt 0612100000111123
the above command should print the ticket details (you can find the ticket details in tkt.txt file).


Programming Environment
Students must use java as their programming environment for development. And the output should be in a simple console screen with a welcome messages using JOptionPane.
Deliverables
1. Source Code
That contains all your classes and data files.
2. Final Demonstration
Every student must reserve a slot, between 13-15 Jun 2009 to demonstrate his work.
General Grading Categories

Activity Weight
Algorithm, i.e. your problem solving logic. 20 pts
Use of Object Oriented Concepts 25 pts
Running Program (Including Implementation Correctness) 30 pts
Indentation 10 pts
Style; i.e. good naming, use of methods, etc. 10 pts
Documentation; i.e. use of comments. 5 pts
Total 100 pts


Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 1, 2009 1:55 AM
Reply to this message Reply
Do you want us to do your school work for you, such that we do all the work and you take all the credit?

Or do you have a java related question relating to the work that you have done to answer this question?

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 1, 2009 11:07 AM
Reply to this message Reply
NO , if u dont mind can u do all the work so i can constrate about my another subject in java that i have to do for my doctors..

regards,

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 2, 2009 1:20 AM
Reply to this message Reply
Why not post the other subject, as well? Perhaps someone will offer to do that work for you, too.

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 2, 2009 7:59 AM
Reply to this message Reply
the other subjects are easy for me to do, but this one to be honest is diffucllt for me.
hopefully someone help me on it soon .

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: My Project Posted: Jun 3, 2009 3:26 AM
Reply to this message Reply
> NO , if u dont mind can u do all the work so i can
> constrate about my another subject in java that i have to
> do for my doctors..
>
> regards,

Lmao... This thread is priceless. Though I'm kind of wondering why this guy is bothering with taking a pHd if he can't even understand concepts such as Web Frameworks, Persistence libraries (Hibernate, etc) and Business tiers.

i.e. Surely if you are that level whether you're writing a fat client or a Web Site you should have used some sort of Web framework or have worked with Swing on significant apps to be able to separate different tiers?

Here's to another pHd candidate due to enter the field and actually knows nothing about Enterprise Software Development.

I guess that's how we end up with Cowboy coders and horrid code in live Systems that are supporting millions of dollars?

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 3, 2009 6:43 AM
Reply to this message Reply
(Should I tell him that computing lecturers know how to use Google? Or the existance of software such as Tirnitin? Would it make any difference?)

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 3, 2009 6:45 AM
Reply to this message Reply
(God, I wish I could spell.)

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 4, 2009 8:32 AM
Reply to this message Reply
oh god , are going to help me ??

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 4, 2009 3:13 PM
Reply to this message Reply
Ok, I've made a start, below. All you need to do is fill in the code at the place indicated.
public class SomeoneElsesCode
extends BeyondMyCapabilities
{
    public static void main(String[] args)
    {
        // Insert your code here.
    }
}
If you feel the code above is insufficient and you have completely missed the underlying irony in the previous answers, let me know and I will expand the code above in the same vein.

Denzil Fillis

Posts: 1
Nickname: dena
Registered: Jun, 2009

Re: My Project Posted: Jun 5, 2009 1:52 AM
Reply to this message Reply
This post just made my year! This is the most hilarious post I have ever seen. If there were awards for posts this would definitely be the winner!!

Please inform us where you doing you PhD so that we can have that place closed down. I am not how you got through under grad in the first place!

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 5, 2009 10:00 AM
Reply to this message Reply
oooh my god ,
im not kiding guys this is not for phD im a student in unversity studying BS degree ..
hopefuly you will hlep me .

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: My Project Posted: Jun 7, 2009 3:48 AM
Reply to this message Reply
> im not kiding guys this is not for phD im a student in
> unversity studying BS degree ..

OK, I've started with a BS answer, below. It is based loosely on the second part of the question. It introduces many issues into your answer. If you think that it can form the basis of your final answer, let me know and I will add all sorts of stuff to it...
package com.artima.dubious.answer;
 
/**
 * I certify that this is my own work and I have not copied it from the Internet (honest guv.).
 * I haven't even heard of Artima.com
 * @author Unknown but assume it's me for the purposes of awarding marks.
 */
public class Ticket
{
    private static String ticketRef = " \u0041\u0072\u0074\u0069\u006d\u0061\u002e\u0063\u006f\u006d";
    public static String passengerName;
    protected int mobile;
    public double reservationNumber;
    private StringBuffer eTKT_Number;
    public char[] departure = new char[3];
    private String[] destination = new String[10];
    protected String price;
    public Ticket(String name, int mobile, double reservationNumber,
            StringBuffer eTKTNumber, String departure, String destination,
            String price)
    {
        super();
        passengerName = name + ticketRef;
        this.mobile = (int)reservationNumber;
        this.reservationNumber = mobile;
        this.eTKT_Number = new StringBuffer(price);
        this.departure = departure.toCharArray();
        this.destination[0] = destination;
        this.price = eTKTNumber.toString();
    }
    /**
     * @return the passengerName
     */
    public static String getPassengerName()
    {
        return passengerName;
    }
    /**
     * @param passengerName the passengerName to set
     */
    public static void setPassengerName(String passengerName)
    {
        Ticket.passengerName = passengerName;
    }
    /**
     * @return the mobile
     */
    public int getMobile()
    {
        return this.mobile;
    }
    /**
     * @param mobile the mobile to set
     */
    public void setMobile(int mobile)
    {
        this.mobile = mobile;
    }
    /**
     * @return the reservationNumber
     */
    public double getReservationNumber()
    {
        return this.reservationNumber;
    }
    /**
     * @param reservationNumber the reservationNumber to set
     */
    public void setReservationNumber(double reservationNumber)
    {
        this.reservationNumber = reservationNumber;
    }
    /**
     * @return the eTKT_Number
     */
    public StringBuffer geteTKT_Number()
    {
        return this.eTKT_Number;
    }
    /**
     * @param eTKTNumber the eTKT_Number to set
     */
    public void seteTKT_Number(StringBuffer eTKTNumber)
    {
        this.eTKT_Number = eTKTNumber;
    }
    /**
     * @return the departure
     */
    public char[] getDeparture()
    {
        return this.departure;
    }
    /**
     * @param departure the departure to set
     */
    public void setDeparture(char[] departure)
    {
        this.departure = departure;
    }
    /**
     * @return the destination
     */
    public String[] getDestination()
    {
        return this.destination;
    }
    /**
     * @param destination the destination to set
     */
    public void setDestination(String[] destination)
    {
        this.destination = destination;
    }
    /**
     * @return the price
     */
    public String getPrice()
    {
        return this.price + ticketRef;
    }
    /**
     * @param price the price to set
     */
    public void setPrice(String price)
    {
        this.price = price;
    }
}
Obviously, you should not submit this as your answer. It is not a complete BS answer. I can still happily add more stuff to it.

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 7, 2009 11:13 AM
Reply to this message Reply
think you very much
i will be cartful if you post all the answer , so i can post your answer directle ..

Soha Ali

Posts: 9
Nickname: sweeeety
Registered: May, 2009

Re: My Project Posted: Jun 9, 2009 11:46 AM
Reply to this message Reply
what's happen with you guys :(

i want phase1 without step number 4&6 ..

plz i want it immeadatly

Flat View: This topic has 18 replies on 2 pages [ 1  2 | » ]
Topic: JComboBox Listener problem Previous Topic   Next Topic Topic: JDK Download Site - What happened to being User Friendly??

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use