Programming
NCUK INTERNATIONAL YEAR ONE ENGINEERING
IDEPG001 Programming
Coursework
The marks for each element are clearly indicated in the attached marking
scheme.
This assignment constitutes 70% of the total marks for this subject.
Programming
Programming V1 2324 © NCUK Ltd. 2023 Page 2 of 8
The brief
As part of a climate change project, a nature reserve near the city of Durham, North East
England requires a program to record and analyse rainfall data. The data are collected
from rain gauges and entered manually into a test file. The program will load and analyse
the data.
Your program should perform the following functions:
1. Load data from a text file. The format, and sample data are shown below.
2. Display formatted data onto the screen, for example:
3. Perform data analysis in the following way, displaying results on the screen in a
suitably formatted way.
a. For a specific year which is entered by the user: The rainfall for each month,
total annual rainfall, mean monthly rainfall, the month with least rainfall (&
its value), the month with the most rainfall (& its value).
i. NB To demonstrate you can use structures, the statistics (should be
calculated and stored in a suitable data structure (C struct).
b. For a specific period between 2 years (which are entered by the user): The
mean annual rainfall, year with least rainfall (& its value), the year with
most rainfall (& its value).
c. For a specific period between 2 years (which are entered by the user): a
sorted list of years and annual rainfall.
d. For a specific period between 2 years (which are entered by the user): the
driest month and wettest month in the period (with year, month & values).
e. For a given year, the variance from the long term mean of annual rainfall.
4. The options should be offered as a menu on the screen, Option 3 should provide a
sub-menu for the analysis options. There should be options to exit the sub-menu
and program. A simple text menu, such as the following is appropriate: Programming
Programming V1 2324 © NCUK Ltd. 2023 Page 3 of 8
5. Validation of inputs should be included as follows:
a. Menu choices should be limited to integers in the range of options
b. Years that are entered should be limited to integers in the range of the fullyear
data.
c. Where two years are entered (for a range), the second year must be greater
than the first.
Guidance
1. Your program should be well structured and commented, with meaningful variable
names. Constants and user-defined functions should be used in appropriate places
for clarity and to reduce duplication.
2. The program should be developed in an incremental way, we recommend that you
start by creating the menus, and validation of the menu choices before moving
onto the more complex elements.
3. Functions should be used to break the program up into meaningful (and reusable)
modules.
4. Look carefully at the marking scheme and grading rubric to ensure you meet the
requirements of the assignment in full. Ask your tutor if there are any aspects that
you do not understand.
5. Note that the results of the single-year analysis must be stored in a data structure
(struct).
6. At the end, it is recommended that you put your program through a pretty printer
to ensure it is consistently formatted.
Data
The data to be used by the program is shown below. This should be copied into a text file
for the program to read. The name of the text file can be hard coded into the program in
this assignment.
Programming V1 2324 © NCUK Ltd. 2023 Page 5 of 8
Marking scheme
Part 1 – Design (30%)
It is expected that you will follow the guidance provided in the lectures to produce
your models. Flowcharts and Pseudo code are alternative ways of process
modelling. To demonstrate that you can use both representations, you should
provide models as follows:
Pseudo code (10%) should be provided for the analysis options 3a (single
year analysis) and 3c (sorted list).
Flow chart (10%) should be provided for the Load data option.
STD (10%) A State Transition Diagram should be provided for the menu
system.
Part 2 – Test plan (20%)
Details of what is to be tested, why, what was the expected outcome, remedial
action if required. All tests should be supported by a screen shot proving the test
was completed.
Part 3 – Application (40%)
All source code provided in a numbered listing with a consist use of comments,
appropriate naming convention and pretty printing.
The code must be suitably demonstrated for the marks to be awarded for this
element. You are expected to be able to answer questions about your program
and handle the tutor modifying the source data.
Part 4 – Review (10%)
A suitably written reflective report communicating your learning through the
assignment, the skills you have developed and areas that need further
improvement.
All submissions are to be in the format detailed by your tutor.
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
-
Zymeworks Announces FDA Clearance of Investigational New Drug Application for ZW171, a novel 2+1 T-cVANCOUVER, British Columbia, June 17, 2024 (GLOBE NEWSWIRE) -- Zymeworks Inc. (Nasdaq: ZYME), a clinical-stage biotechnology company developing a di2024-06-17
-
Indonesia Stock Exchange Partners with Nasdaq to Upgrade Market InfrastructureTechnology partnership will further enhance overall resilience and integrity of the exchange, while supporting the rapid deployment of new products2024-06-17
-
Adalvo 的 Liraglutide 預充式注射筆成為歐盟首款獲得批准的仿製藥馬爾他聖瓜安, June 17, 2024 (GLOBE NEWSWIRE) -- Adalvo 宣布 Liraglutide 預充式注射筆成功取得 DCP 批准,成為歐盟首款獲得批准的仿製藥。 根據 IQVIA 的報2024-06-17
-
促进生育,助力三胎——“三胎免费生”联合公益行动正式启动为积极响应国家号召实施三胎生育政策,扩大妇幼服务健康供给,在云南省优生优育妇幼保健协会指导下,昆明广播电视台联合昆明安琪儿妇产医院,于6月13日在昆明广播2024-06-17
-
学党史传承红色精神 守党纪筑牢自律防线——平安养老险湖南分公司党支部开展主题党日活动七一前夕,平安养老险湖南分公司党支部全体成员走进“千年学府、百年师范”——湖南第一师范,开展了一次学史明理、学史增信、学史崇德、学史力行的主题党日活动。重2024-06-17