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
> 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?
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.
> 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.
*/
publicclass Ticket
{
privatestatic String ticketRef = " \u0041\u0072\u0074\u0069\u006d\u0061\u002e\u0063\u006f\u006d";
publicstatic String passengerName;
protectedint mobile;
publicdouble reservationNumber;
private StringBuffer eTKT_Number;
publicchar[] departure = newchar[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
*/
publicstatic String getPassengerName()
{
return passengerName;
}
/**
* @param passengerName the passengerName to set
*/
publicstaticvoid setPassengerName(String passengerName)
{
Ticket.passengerName = passengerName;
}
/**
* @return the mobile
*/
publicint getMobile()
{
return this.mobile;
}
/**
* @param mobile the mobile to set
*/
publicvoid setMobile(int mobile)
{
this.mobile = mobile;
}
/**
* @return the reservationNumber
*/
publicdouble getReservationNumber()
{
return this.reservationNumber;
}
/**
* @param reservationNumber the reservationNumber to set
*/
publicvoid 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
*/
publicvoid seteTKT_Number(StringBuffer eTKTNumber)
{
this.eTKT_Number = eTKTNumber;
}
/**
* @return the departure
*/
publicchar[] getDeparture()
{
return this.departure;
}
/**
* @param departure the departure to set
*/
publicvoid setDeparture(char[] departure)
{
this.departure = departure;
}
/**
* @return the destination
*/
public String[] getDestination()
{
return this.destination;
}
/**
* @param destination the destination to set
*/
publicvoid setDestination(String[] destination)
{
this.destination = destination;
}
/**
* @return the price
*/
public String getPrice()
{
return this.price + ticketRef;
}
/**
* @param price the price to set
*/
publicvoid 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.