Home B101 B142L B202 B302 B324 M520 Mosaic Course updatesPresentation format
<http://cnfolio.com/B142LCW20100521>
Introduction to Computing – B142L

B142L Coursework assignment 2 – Referral

Academic year 2009/10



COURSEWORK DUE DATE

9pm May 21, 2010



COURSEWORK DESCRIPTION

Students are required to submit their coursework online using their individual coursework pages on the Mosaic website.

Coursework submissions MUST satisfy the following requirements:
  1. There will be at least one saved version per question answered.
  2. The answer to all questions must be written as one single program.
  3. Answers must not be copied from any printed sources, electronic sources or other people.

Answer all questions. This assessment has a total of 20 marks. Each question will be marked according to the following criteria:
MarksCriteria
5Source code uses an effective design to answer the question, compiles without errors and includes informative comments.
4Source code answers the question, compiles without errors and includes informative comments.
3Source code answers the question and compiles without errors.
2Source code is relevant to the question, but does not compile.
1Source code is incorrect or not relevant to the question.

Marks for this referral assessment will update the Coursework 2 mark according to the following table:
  Current mark       Maximum new mark    
13+Any higher
11 – 1214
9 – 1012
810
0 – 78




COURSEWORK QUESTIONS

QUESTION 1
[5 Marks]

Write a C program that uses a stack or a queue to store daily temperature values. The data structure size must be 10. The program must:



QUESTION 2
[5 Marks]

In the same program as question 1, add source code to calculate the average temperature value for all the inputs stored in the data structure. The program must display a message, "Summer time!", if the average temperature is greater than 25 degrees Celsius. The program must display a message, "Winter time!", if the average temperature is less than 5 degrees Celsius. Otherwise, the program should not display any messages. The daily input temperature values are provided in Celsius.



QUESTION 3
[5 Marks]

In the same program as question 1, add source code to calculate and display the following information for all values in the data structure:



QUESTION 4
[5 Marks]

In the same program as question 1, add source code to implement the following rule to handle missing input values: