: : : : At the end of the registration period, the program should generate a seating plan of the anniversary dinner for the organising committee in a text file. Makers should clearly define the seat allocation rules and any other system parameters such as table size. Some possible seat allocation rules are as follow:
: : : :
: : : : 1.Grouping family members together
: : : : 2.balancing male and female participants
: : : : 3.grouping similar age participants
: : : : 4.grouping similar employment participants
: : : :
: : : : The program should consider at least TWO seat allocation rules at the same time to generate a seating plan .
: : : :
: : :
: : :
: : : i don't know how to make some allocation rule, for example,1 and 2.
: : : also, i don't know how to combine them
: :
: : Is this being done in TP for Windows as well? I think you can find some database functions with TPW, but like most here,I work in TP for DOS.
: :
: : In DOS, I would create a procedure (or routines in a main sorting procedure) for each allocation rule. They would read from the database in the order that they are in and rearrange them into the output for that function. Then to run more than one rule, just call them in reverse order. For example, say we have the following data:
: :
: :
: : Jane Smith F 28
: : John Doe M 46
: : Joe Smith M 32
: : Edward Mally M 64
: : Tina Zerod F 18
: : Alice Doe F 45
: : Ashley Doe F 16
: : Mark Zerod M 53
: :
: :
: : Say we want to order them by Family First, then Age.
: : If we run it through the Age procedure first, then our list will look like so:
: :
: : Edward Mally M 64
: : Mark Zerod M 53
: : John Doe M 46
: : Alice Doe F 45
: : Joe Smith M 32
: : Jane Smith F 28
: : Tina Zerod F 18
: : Ashley Doe F 16
: :
: :
: : Now, if we run it through the Family procedure, we will get this:
: :
: : Edward Mally M 64
: : Mark Zerod M 53
: : Tina Zerod F 18
: : John Doe M 46
: : Alice Doe F 45
: : Ashley Doe F 16
: : Joe Smith M 32
: : Jane Smith F 28
: :
: :
: : Therefore, we can run it through as many rules as we want and it will come out correctly ordered.
: :
: : Now all you need to do is write a procedure for each. Family should be easy by comparing last name, sex is just a single character comparison, age is simply number comparisons, and if you have a list of occupations that they can choose from, then that will be easy too, otherwise you will need a cross-reference for related fields, etc.
: :
: : Also, when doing character/string comparisons, make sure you convert them to all uppercase (or lowercase) first before comparing.
: :
: : Phat Nat
: :
: :
: thx, i think i have a basic concept of the program.
:
Also, if i want to insert a picture in the program, how can i do?