• Post Reply Bookmark Topic Watch Topic
  • New Topic

book air tickets help  RSS feed

 
Manaf Abdul
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am creating a mini software on Airlines_booking (a software to book air tickets on Bluej) and I have done 99% of it . One of the concepts I am supposed to use is 2D array in this software now I am wondering where can the usage of 2d array be done in a booking system. I have pondered over it a lot vut not got any idea yet. Can someone please help me out : Where to use 2D array in Airlines_Booking project please ? PS : I am a 10th grade student so please avoid complicated terminoligies. I repeat that the project is to be done on Blue-J.
 
Dóra Takács
Ranch Hand
Posts: 39
4
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since we have no idea how complicated this application of yours might be, I suggest you add pricing categories, such as:
LONG FLIGHT -> full-price, student(50%), discount, etc.
MEDIUM FLIGHT -> full-price, student(50%), discount, etc.
SHORT FLIGHT -> full-price, student(50%), discount, etc.

So your 2D array would look something like the following:
0. row: 1000(euros?), 500, 700
1. row: 700, 350, 600
2. row: 200, 100, 150
.....

I only suggest this because you mentioned you are a 10th grade student. If your teacher can't tell you where to implement a 2D array that would make sense, you are free to put it there in any place. I don't think you can put in a 2D array that would be actually useful and in good coding practice for this kind of a program, but others commenting after me might give you a better idea!
The point is, you can put it anywhere. Your teacher probably just want you to get familiar with handling and using one.


 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dóra Takács wrote:. . . If your teacher can't tell you where to implement a 2D array that would make sense, you are free to put it there in any place. I don't think you can put in a 2D array that would be actually useful and in good coding practice . . . Your teacher probably just want you to get familiar with handling and using one.
What a useful thing to say; I would be suspicious of parallel arrays like that, but you are right; they simply want OP to try using arrays of arrays.

And welcome to the Ranch Manaf Abdul
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dóra Takács wrote: If your teacher can't tell you where to implement a 2D array that would make sense, you are free to put it there in any place.


I would argue that this is unlikely. IMHO, instructors tend to be very specific on how to use certain features with assignments. I would argue that this is because they want to micromanage the learning; and quite frankly, it is also easier to grade, as the solution is following a very specific set of instructions.

Personally, I think it is a good idea that the instructor gives freedom on how to use a feature. I am just not holding my breath that this is happening here.

Henry
 
Dóra Takács
Ranch Hand
Posts: 39
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would argue that this is unlikely. IMHO, instructors tend to be very specific on how to use certain features with assignments. I would argue that this is because they want to micromanage the learning; and quite frankly, it is also easier to grade, as the solution is following a very specific set of instructions.


I agree on that, as most instructors of mine have done this also. But from reading the OP's question, I took it as he has a set of requirements that needs to be in his homework program, like the 2D array and who knows what else that he has already done. I remember having similar homeworks like that too. We were given a free hand on what we actually do as long as it contained the learning material in a satisfactory way. I assumed this from:

One of the concepts I am supposed to use is 2D array in this software now I am wondering where can the usage of 2d array be done in a booking system.


I definitely agree with Henry though. OP Manaf, consult your instructor on what you have decided to implement first, so that it wont be wrong for sure!

Best hopes!
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:. . . I think it is a good idea that the instructor gives freedom on how to use a feature. I am just not holding my breath that this is happening here.

Henry
Agree. But I think it is even better if instructors don't micromanage assignments and don't make that sort of stipulation in the first place. It might be easier to mark, but it encourages the students into bad habits.
 
Manaf Abdul
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dóra Takács wrote:Since we have no idea how complicated this application of yours might be, . . . Your teacher probably just want you to get familiar with handling and using one.



You are right my teacher can't tell me but I am still struggling since I cant use the method you suggested because cost for travelling from different cities and to different cities is different . Can you please give me a better idea. I will be grateful brother.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't quote the whole of a previous post because that adds nothing to the discussion. I have removed most of it.
Please show us what you have got so far; we cannot do your assignment for you, but we can comment on what you have achieved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!