calling to another class from another class
In my program I am trying to write I want to call to another class which has variables stored in it that I want to call and print out in an entire different class under one package in eclipse. In this program I am trying to design a working airport in which it tracks airplanes coming in to the airspace then land and being taxied off. Also planes take off from this airport. So i created an airport class in which all the loops and functions take place then a Runway object class to store the different variables each plane created needed such as flight number, amount if fuel(if incoming), and incoming altitude (also if incoming). If any body could show me the syntax to connect these two classes. And if you know how priority queues work that would be helpful. If you need to see the code let me know
thanks
Re: calling to another class from another class
Ok, there is a bit of information there which is not very relevant to your specific question.
Give us a brief overview of the classes you made, and how they interact. For example, if you were creating a program that was a car mechanic business or something, you would have something like this:
1. A Car class which represents a car that is being serviced
2. A Garage class which can contain at most one Car at any time
3. A Building class which contains a list of Garages
In this example, Building would have an array of Garages, and each Garage would have a Car variable.
What classes do you have for your airport, and how do they interact with each other?
As for your question about the Priority Queue, are you allowed to use the Priority Queue class (PriorityQueue (Java Platform SE 6))?
Re: calling to another class from another class
I actually got it it was a simple error of me putting a queue in the main argument rather in another class. Also about the priority queues our professor said he would go over it tomorrow. Thanks for the help though I really appreciate it.