Really simple Pascal

Fertiggestellt Veröffentlicht Nov 6, 2003 Bezahlt bei Lieferung
Fertiggestellt Bezahlt bei Lieferung

Assigning students to laboratory classes. Possibility of clashes ignored. 60 students enrolled on the course. You must assign each student to one of six different classes, taking into account the capacity of each class. Each student has four choices, none of which are guaranteed to be satisfied.

You need two files for the input to your program.

- A file called "[url removed, login to view]", contains details of the 60 students. Each student record has a surname of type string, a forename of type string, and their four choices of lab session, each option an integer, separated by spaces on a single line. A couple of records from the file might look like this:

Lewis

George

1 3 4 2

Chan

Jacky

4 6 5 2

.....

which means that George Lewis' first choice of lab session is session number 1, then session number 3 etc.

- A file called "[url removed, login to view]". This contains details of the six lab classes to which the students must be assigned. Each lab class record has a number, of type integer, a day, of type string, a time, also of type string and a capacity, an integer. A couple of records:

1

Monday

1:30

18

2

Monday 3:30

22

....

which means that lab class one is at 1:30 on Mon. and can sit no more than 18 students.

Job is to read in the data, store them in appropriate data structures and then assign students to classes, ensuring that no class has more students than it can sit. You must then pring out a class at a time to the screen, detailing the lab class number, the day and time, an alphabetical list of the students assigned to that class, and a misery factor for that class. Your program should stop after printing each class' details so that the user can read the information provided. The misery factor of a class is the sum of the misery factor for each student in that class. Each student's misery factor is calculated:

- student assigned to 1st choice, misery factor 0

- student assigned to 2nd choice, misery factor 5

- 3rd choice, factor 10

- 4th choice, factor 15

- none of his choices misery factor 20

Assumptions

You may assume that the files are in the described format, that they exist and that there are no typing errors. You may assume that no class has a capacity of more than 15 students. If you make any other assumptions you must explain them in the form of comments at the top of your code.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

Delphi 6.0

Delphi Ingenieurwesen MySQL PHP Softwarearchitektur Testen von Software

Projekt-ID: #3004548

Über das Projekt

5 Vorschläge Remote Projekt Aktiv Nov 7, 2003

Vergeben an:

vw966435vw

See private message.

$7 USD in 2 Tagen
(12 Bewertungen)
2.5

5 Freelancer bieten im Durchschnitt $8 für diesen Job

shakaworld

See private message.

$8.5 USD in 2 Tagen
(246 Bewertungen)
5.4
icodeinc

See private message.

$8.5 USD in 2 Tagen
(1 Bewertung)
0.3
alancohenvw

See private message.

$8.5 USD in 2 Tagen
(2 Bewertungen)
0.0
acdvw

See private message.

$8.5 USD in 2 Tagen
(0 Bewertungen)
0.0