However, this was only for one destination. I want to be able
to have as many destinations as I want.
The numbers of seats should be the same for every destination.

OK, How will this work.
One common technique for capturing these kinds of requirements is to
write a "story" of how the user interacts with the system. (Sometimes
called a "Usecase")

I>magine that the system exists, how would you describe the interaction?

Do it as a dialog, for example:

1 User logs into application
2 System presents welcome screen
3 User selects first destination from dropp down list
4 System presents seat chooser screen with available seats displayed
5 User selects seat(*)
6 System updates display
7 System displays price to user
8 User validates choice
9 System returns to home screen and confirms the booking
10 User selects next destination(*)
11 Repeat from step 4-9

5A Alternately user rejects all choices and cancels booking
10A Alternately user logs out.

By doing that it will be clearer how youi want the system to respond. At
the moment we can only guess what you are thinking the system should do.


Alright, my apologise for being unclear about this.
To begin with, it is in the code you create how many destinations you want. In my example I created three destination buttons. The user is not supposed to change anything when the program is running. As you can see in the code, I am using a variable "NUMBEROFCHAIRS". If you want 30 chairs you simply set the value to 30 for that value. If you want 50 chairs you set the value to 50 and so on.

I want to do this in a similiar way, but for destinations instead. So if I press the destination1 button, one window with 32 buttons appear. The filename should be destination one. If I press destination2 button, one window with 32 buttons appear, and the filename for the saved files
should be destination2.

You asked why I was trying to get this to work with for and while loops? I figured that since that was the way I created the chairs I figured I could do the same to
create destinations.

I will write on of these Usercases so what I am trying to accomplish is understandably.

1.User starts program.
2.User choose destination1.
3. window with chairs appear.
4.User press one/many of the chairs
5. File is saved with the name of the destination and seat number (ie destination1 seat 2)
6. User close window and is returned to the window with the destinations.
7. He can choose another destination, which repats step 2-6.




So it is in the code I should be able to create any number of destinations that I want. Like I have a variable named NUMBERSOFDESTINATIONS=5 for example. Then there should be five destinations buttons. If one is pressed a window with chairs should appear. If a green button is pressed, a file with the name destination(x) and seat(a) should be saved. x is the number of the destination. It should be one if it is the button labeled destination 1 that is clicked, two if the button labeled destination2 is clicked and so on. A is the number of the seat that is clicked. This is already working fine though!



I really hope I made my intentions clearer now. Tell me if it is still unclear or confusing!


Thanks for your reply!


Mic

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to