Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Pascal:Seating plan

gaddagadda Posts: 34Member
Makers are required to write a computer program for the school annual dinner registration. During the data collection stage, personal information of the participants is required to be input into the program,i.e. name of the participants, sex,age.

The program should validate all input data and also have functions to amend the input data

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 .

Comments

  • gaddagadda Posts: 34Member
    : Makers are required to write a computer program for the school annual dinner registration. During the data collection stage, personal information of the participants is required to be input into the program,i.e. name of the participants, sex,age.
    :
    : The program should validate all input data and also have functions to amend the input data
    :
    : 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
  • Phat NatPhat Nat Posts: 757Member
    : : 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:

    [code]
    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
    [/code]

    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:
    [code]
    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
    [/code]

    Now, if we run it through the Family procedure, we will get this:
    [code]
    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
    [/code]

    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

  • gaddagadda Posts: 34Member
    : : : 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:
    :
    : [code]
    : 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
    : [/code]
    :
    : 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:
    : [code]
    : 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
    : [/code]
    :
    : Now, if we run it through the Family procedure, we will get this:
    : [code]
    : 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
    : [/code]
    :
    : 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.
  • gaddagadda Posts: 34Member
    : : : : 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:
    : :
    : : [code]
    : : 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
    : : [/code]
    : :
    : : 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:
    : : [code]
    : : 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
    : : [/code]
    : :
    : : Now, if we run it through the Family procedure, we will get this:
    : : [code]
    : : 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
    : : [/code]
    : :
    : : 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?
  • Phat NatPhat Nat Posts: 757Member
    : : : 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?
    :

    You're kind of asking on the wrong board (although this is the right board), I don't think any of us use TPW. Just TP for DOS and I believe Zibadian runs Delphi. Try searching the web with http://www.Google.com / http://www.Yahoo.com / http://www.Metacrawler.com /etc and see what come up.

    Phat Nat

  • chengterry2005chengterry2005 Posts: 1Member
    : : : : 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?
    : :
    :
    : You're kind of asking on the wrong board (although this is the right board), I don't think any of us use TPW. Just TP for DOS and I believe Zibadian runs Delphi. Try searching the web with http://www.Google.com / http://www.Yahoo.com / http://www.Metacrawler.com /etc and see what come up.
    :
    : Phat Nat
    :
    :

    hey gadda
    you are cheating!!!You got wrong in asking for help in the CIT HKCEE Examination.You are so dog.
Sign In or Register to comment.