Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-07-2008, 03:58 PM
Member
 
Join Date: Dec 2007
Posts: 13
coe11n is on a distinguished road
please help .................................................. ..
hi every one here



save fligth

public class Flight {
private int fligthID;
private String fligthSource;
private String fligthDestination;
private int numOfSeats;
private char[][] seatsPlane;
private int sequance;
private Reservation[] reservation;

public Flight() {
}


//setters
public void setFligthID(int fligthID){
this.fligthID = fligthID;
}
public void setFligthDestination(String fligthDestination){
this.fligthDestination = fligthDestination;
}

public void setFligthSource(String fligthSource){
this.fligthSource = fligthSource;
}

public void setnumOfSeats(int numOfSeats){
this.numOfSeats = numOfSeats;
}

public void setseatsPlane(char[][] seatsPlane){
this.seatsPlane = seatsPlane;
}

public void setsequance(int sequance){
this.sequance = sequance;
}

public void setReservation(Reservation[] reservation){
this.reservation = reservation;
}


//getters
public int getFligthID(){
return fligthID;
}
public String getFligthDestination(){
return fligthDestination;
}
public String getFligthSource(){
return fligthSource;
}
public int getNumOfSeats(){
return numOfSeats;
}
public char[][] getSeatsPlane(){
return seatsPlane;
}
public int getSequance(){
return sequance;
}
public Reservation[] getReservation(){
return reservation;
}


//toString
public String toString(){
return fligthID+" "+fligthDestination+" "+fligthSource+" "+numOfSeats+" "+seatsPlane+" "+sequance+" "+reservation;
}

//bolean
public boolean equals(Flight c){
return (fligthID==c.fligthID) && (fligthDestination==c.fligthDestination) && (fligthSource==c.fligthSource) && (numOfSeats==c.numOfSeats) && (seatsPlane==c.seatsPlane) && (sequance==c.sequance) && (reservation==c.reservation);
}


save fligth

public int saveFligth(){

}




}

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >>>>>


save passenger


public class Passenger {
private int PassengerID;
private String name;
private String mobile;
private Reservation[] reservation;

public Passenger() {
}

//getters

public int getPassengerID(){
return PassengerID;
}
public String getName(){
return name;
}
public String getMobile(){
return mobile;
}
public Reservation[] getReservation(){
return reservation;
}

//setters
public void setPasnengerID(int PassengerID){
this.PassengerID = PassengerID;
}
public void setName(String name){
this.name = name;
}
public void setMobile(String mobile){
this.mobile = mobile;
}
public void setReservation(Reservation[] reservation){
this.reservation = reservation;
}

//toString
public String toString(){
return PassengerID+" "+name+" "+mobile+" "+reservation;
}

//boolean
public boolean equals(Passenger d){
return (PassengerID==d.PassengerID)&&(name==d.name)&&(mob ile==d.mobile)&&(reservation==d.reservation);
}



}


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< << <<<<<<



public class Reservation {
private int rservationNumber;
private char[] arrayOfSeats;
private Flight flight;
private Passenger passenger;

public Reservation() {
}
//setters
public void setRservationNumber(int rservationNumber){
this.rservationNumber = rservationNumber;
}

public void setArrayOfSeats(char[] arrayOfSeats){
this.arrayOfSeats = arrayOfSeats;
}
public void setFlight(Flight flight){
this.flight = flight;
}
public void setPassenger(Passenger passenger){
this.passenger = passenger;
}

//getters
public int getRservationNumber(){
return rservationNumber;
}
public char[] getArrayOfSeats(){
return arrayOfSeats;
}
public Flight getFlight(){
return flight;
}
public Passenger getPassenger(){
return passenger;
}

//toString
public String toString(){
return rservationNumber+" "+arrayOfSeats+" "+flight+" "+passenger;
}

//boolean

public boolean equals(Reservation x){
return (rservationNumber==x.rservationNumber) && (arrayOfSeats==x.arrayOfSeats) && (flight==x.flight) && (passenger==x.passenger);
}

}

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >



plese see the attatch and sole the


saveflight, passenger, resrevation

get flight object, passenger object and reservation object



thanks
Attached Files
File Type: zip ics102_071_project.zip (14.6 KB, 7 views)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-07-2008, 04:04 PM
jelly's Avatar
Member
 
Join Date: Jan 2008
Location: Somerset, UK
Posts: 46
jelly is on a distinguished road
What's your question or problem?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-07-2008, 04:31 PM
Member
 
Join Date: Dec 2007
Posts: 13
coe11n is on a distinguished road
i hava not any idea about

saveflight, passenger, resrevation

get flight object, passenger object and reservation object




see atach plesea and solve them plesea
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-07-2008, 05:01 PM
jelly's Avatar
Member
 
Join Date: Jan 2008
Location: Somerset, UK
Posts: 46
jelly is on a distinguished road
The idea of the forums is to help with problems not to do the homework or assignments for you Start with the easiest one - saveFlight() your assignment says save the details in a file called Flight.txt. SaveFlight will be passed a Flight object, it has getters that will enable you to retrieve the state of the object, you then store these values in a file using java.io ( or if you have seen it yet serialisation) How you store them is up to you, maybe just read each value and write it to the file in turn. You can check if it works by looking at the file. Once that work you should be well on the way to savePassenger and saveReservation as they are similar.

Shout if you get problems and post code that is causing you problems.
__________________
-- Hope that helps

Last edited by jelly : 01-07-2008 at 05:11 PM.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-07-2008, 05:29 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Jelly gave you some good tips to get you started, and I hope you take note of them - for your own sake. Your attachment's detailed instructions lay everything out for you. Get started - January 11th is not that far away.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 01-07-2008, 06:55 PM
Member
 
Join Date: Dec 2007
Posts: 13
coe11n is on a distinguished road
no body will help me


the project very important for me if i will not do it i will Proceed


plesae help me


i will not forget that for you


this is not Humane
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 01-07-2008, 07:03 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
We can only help you if you've helped yourself. It's your course, it's your homework. Posting a complete answer for you to turn in is what's not humane, how do you expect to develop your programming skills? by retrieving answers from others? Make a valid attempt at your work, if you get stuck - we'd be glad to help. It's not that difficult to understand, if it's important to you I suggest you do it.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 11:17 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org