Pseudo Code Library |
||||||||||||||||||||||||||||||
Challenge 3: All going wrongThe restaurant has been open for a few weeks now, but things are not going so well. Although the customers don't get the food they hate (unless fate decrees that they should), many of them keep complaining that they don't like the combinations of courses they have been given. This is generating a very negative atmosphere, and often the chef and staff are upset at the behavior of the customers, which they then complain to Edgar about. It is getting very depressing. As a result, Edgar has decided that all prospective customers will undergo an 'appreciation' test (like an aptitude test, but for customers) and only the least likely to complain will be allowed to eat in the restaurant. On the day of the customer's booking, they are contacted and given eight random combinations of starter, main and pudding. They have to say if they would be prepared to eat that combination, 'y' or 'n' (not case sensitive). If they answer anything else, they get asked again until they give an acceptable response. The number of 'y' answers is totaled, and the customer's name and their score of 'y' answers is added to a file. At opening time, Edgar searches through the file and loads the 'appreciation test' scores for each customer. If they have more than one entry, he takes the most recent. He also works out the average score for all customers. He then sorts the list with the highest scores at the top and prints the names of all the customers with an above average score, highest score first. These people are phoned and told that they can come to the restaurant. All the people with below average scores are contacted and told that the restaurant is closed that evening. Edgar hopes that by doing this, there will be a more appreciative atmosphere in the restaurant. Requirements: part 1Write a program which:
ResourcesPlease base your code on the challenge 3 template here. Download and complete the challenge 3 evidence document.
Requirements: part 2Write a program which:
|