Carefully read all of the questions and provide solutions to all three questions.
• Word process your solution. Include a completed assignment cover sheet as the first page of your document and convert the whole document to .pdf
• Submit your assignment in the assignment submission tool available in Moodle (Week 11). Late submissions will be penalised. Note: The assignment is marked out of 30 marks but is worth 15 marks i.e. 15%
• Your assignment will be assessed on how well your solutions have addressed the problem and met the requirements, and on the overall “correctness” of your solutions. Use of appropriate constructs; appropriate messages/error messages; suitable formatting of output; and use of appropriate modularisation techniques are further assessment criteria.
1. Draw a defining diagram for the following problem statement.
A program that prompts for and obtains the hourly temperatures for a whole day (24 hours). These temperatures should be between -10 and +50. The average, minimum, maximum temperature for the day should be displayed. Appropriate error messages should be included.
2. Develop an algorithm for the following problem statement. Your solution should be pseudocode (with appropriate comments) and a desk check of the algorithm.
A program that will prompt the user for a tax code. The tax code represents a tax rate (see table below). If an invalid tax code has been entered then the user should be asked to re-enter the tax code again. The algorithm should calculate the tax rate according to the following:
Tax Code Tax Rate
The tax code and the tax rate should be displayed to the screen with appropriate messages. The algorithm should repeat until the user enters a tax code of 999. A final message displaying the number of (valid) tax codes that were entered should be shown.
3. Develop an algorithm for the following problem statement using appropriate modularisation techniques. Your solution should contain a defining diagram and a pseudocode algorithm.
Your algorithm will process a file of fruit data. Each record in the file contains a unique batch number, the date the fruit was bought by the fruit store manager (batch date), the fruit type (fruit code), the weight (kg) remaining in stock of this batch (stock qty), and price per kilogram (price) that the store manager paid for the fruit.