Hello All,
Still new to Java but got pass the messing around phase and am actually starting on a Project. What I'm trying to do is build a Application that will let me keep track of my flights (I'm a pilot). My background, I had a similar system in MS Access but i'm trying to get away from Microsoft all together. I am fairly knowledgeable in Database, which might be think of ideas that aren't really possible with Java, well atleast not without extensive coding.
Anyways on to the question.
What I itend to do is have a class called Aircraft_Type or such which would have a String for the name of the type and a double for the hourly pay rate for that type. and possbile other things about it, but thats all I can think of for the moment.
Then I would have another class lets say called Aircraft which would I guess would be a subclass of Aircraft_Type which it would have an actual Aircraft Name and then it would have an Aircraft_type with it.
So I would have two types of Aircraft
Type A which pays 10.00 to fly
and
Type B which pays 12.50 to fly
Then lets say I have
Airplane_X which is Type A
Airplane_Y which is Type A
Airplane_W which is Type_B
so when I create Airplane_X and tell its Type_A will it automactically fill attach all the descriptors of aircraft_type A to it? Or is that something that I would have to write in the constructor to search the Aircraft Types then copy them over. Which I would think would be cumbersome when writing to the File since all i would really want to write for each flight is that its Airplane_x not Airplane_x which is type_a which pays 10.00 etc.
Thoughs on how to best do this?
Casey
Still new to Java but got pass the messing around phase and am actually starting on a Project. What I'm trying to do is build a Application that will let me keep track of my flights (I'm a pilot). My background, I had a similar system in MS Access but i'm trying to get away from Microsoft all together. I am fairly knowledgeable in Database, which might be think of ideas that aren't really possible with Java, well atleast not without extensive coding.
Anyways on to the question.
What I itend to do is have a class called Aircraft_Type or such which would have a String for the name of the type and a double for the hourly pay rate for that type. and possbile other things about it, but thats all I can think of for the moment.
Then I would have another class lets say called Aircraft which would I guess would be a subclass of Aircraft_Type which it would have an actual Aircraft Name and then it would have an Aircraft_type with it.
So I would have two types of Aircraft
Type A which pays 10.00 to fly
and
Type B which pays 12.50 to fly
Then lets say I have
Airplane_X which is Type A
Airplane_Y which is Type A
Airplane_W which is Type_B
so when I create Airplane_X and tell its Type_A will it automactically fill attach all the descriptors of aircraft_type A to it? Or is that something that I would have to write in the constructor to search the Aircraft Types then copy them over. Which I would think would be cumbersome when writing to the File since all i would really want to write for each flight is that its Airplane_x not Airplane_x which is type_a which pays 10.00 etc.
Thoughs on how to best do this?
Casey
Comment