• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

book air tickets help

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 41
4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Marshal
Posts: 79177
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79177
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What's gotten into you? Could it be this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic