全文内容
Programming Coursework 2526_01223c93619d718c6fc370f4728f0437 2.pdf
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 1 of 11
NCUK INTERNATIONAL YEAR ONE ENGINEERING
IDEPG001 Programming
Coursework
2025-2026
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 CW
Coursework 2526 © NCUK Ltd. 2526 Page 2 of 11
The brief
You have been asked to write a program to create a prototype for an application to allow
an account holder to keep track of their energy bill. This prototype is a first cycle of the
application and will allow for feedback for future development.
For the first prototype the application will allow the user to enter the current usage
reading from the electricity meter, the day the reading was taken and then to calculate
and display the bill which will be sent to the account holder. The user can confirm the
reading after they have seen the bill.
This prototype is based on bills for a single year and for one account.
The program will read the previous meter readings from a file and write the new
confirmed reading to the file which is formatted as follows:
The first column is for day of entry i.e. 31 is the 31
st day of the year. The second
column denotes the reading entered by the account holder on that day. So on the 31 st
day of the year the electricity usage was 300 kWh. -1 denotes that there is no reading.
A simple bill after a reading may look as follows:
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 3 of 11
Application requirements:
The base requirements for this application have been set as follows:
1. This prototype is based on bills for a single year and for one account.
a. The current year being 2026.
b. The individual account will be allocated an account number of “HT7654”.
It is assumed this is the account number which has already logged in.
2. The electricity costs of unit rate and daily standing charge are fixed for the year,
a. unit rate is fixed at 27.03p per kWh,
b. daily standing charge is fixed at 53.8 p per day.
3. To ease the burden of working with dates the account holder will enter the day of
the year the reading will apply to. I.e . The first day of the year is 1, last day of
the year is 365.
a. It is assumed that the account holder will read the meter which will display
the current usage reading and the day of year. The account holder will
enter these figures into the application to make a reading.
4. The account holder can add a meter reading at any time, the company have
specified that there can be no more than 12 readings per year.
a. it is recommended to the account holder to enter 1 reading per month,
however they can enter less regularly if they wish.
b. The last reading for the year must be for day 365 and so if the user enters
the 12
th reading, the program should not allow entry if the day is less than
365.
c. If the user has entered less than 12 readings and the last one is for day
365, there can be no further readings entered.
d. The program should validate that the reading is higher than the previous
reading stored.
e. The program should also validate that the day of reading is higher than
the previous day of reading stored.
5. The program should calculate and create a temporary bill for the current reading.
a. To calculate the bill for the usage entered since the previous entry you
should subtract the previous reading from the current reading to give you
the usage. Multiply the usage by the unit rate, add the daily charge which
is the number of days between the readings times the daily charge. The
total bill will then have another 5% VAT added.
6. The account holder is asked to confirm they wish to be billed for this reading. If
they confirm the reading is saved and the bill is displayed, if not the reading is
cancelled.
7. The user should be able to cancel the new meter reading at any point of entry.
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 4 of 11
Additional Functionality
The following list can be used to select and implement some additional functionality to
show further knowledge and understanding within your assessment to achieve a higher
grade (see grading rubric regarding grades). It is not expected that you implement any
or all of this. You may add additional functionality of your own idea.
1. The program can read/save the bill data to file.
2. The user can receive a warning if the usage is more than 20% over the average
reading.
3. Readings could be by date rather than by day of year, or by month and day of
month.
4. The user can enter an estimate for a future date/end of year and then check this
against the actual.
5. Dynamic allocation of meter reading data.
6. The user can see the average/min/max bill cost they have incurred.
7. Standing charge changes at a point through the year.
8. Any other suitable.
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 5 of 11
Suggested Data Dictionary for main components:
current_year integer Year of reading, set to
2026
account_no[8] string array Account no of user logged
in, set to “HT7654”
unit_rate float Usage charge in pence for
each kWh used. Fixed at
27.03.
daily_charge float Set daily charge in pence
applied for each day of
usage. Fixed at 53.8p
vat_rate int Vat to be applied to the Bill
once all costs are
calculated. Fixed at 5%.
num_read int Total number of previous
readings which have been
saved this year.
usage[12][2] integer array each row represents a
meter reading. Column 0
denotes the day number
the reading took place.
Column 1 represents the
usage in kWh from the
beginning of the year to
the reading day.
Bill:
account_no
(Struct)
Char (20)
Name of person
day_of_year integer day of reading
prev_day_of_year integer day of previous reading
new_reading integer Reading entered
prev_reading integer The previous reading
entered.
total_charge float Total Charge calculated
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 6 of 11
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 with simple parts, such as reading and displaying the file, entry validation, or
calculation of the bill, before moving onto the more complex elements. Keep note
of testing you have carried out for these.
3. Take note of any issues you have come across and how you have resolved these –
this will help you to demonstrate your knowledge an d understanding of the
coursework.
4. Look carefully at the Coursework Instructions and g rading rubric to ensure you
meet the requirements of the assignment in full. As k your tutor if there are any
aspects that you do not understand.
5. At the end, it is recommended that you put your program through a pretty printer
to ensure it is consistently formatted.
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 7 of 11
Coursework Instructions
Your coursework should be handed in as a report. The report should include each area below. To
demonstrate knowledge and understanding you should document all areas fully as instructed in each
part below. Refer also to Grading Rubric for each part.
Part 1 – Design (30%)
You should produce the following design documentation:
Design
Documentation
Instructions Total Marks
Pseudocode Pseudocode should be provided for
Application Requirement 4 (page 3):
Enter and validate the figures for the
meter reading. (day of reading and the
usage reading figure).
You can assume you have already
stored the figures for previous day of
reading and previous usage reading.
10
Flow Chart (6) A Flow chart should be provided for
Application Requirement 6 (page 3)
Confirm they wish to be billed for this
reading. You can assume the data for
the reading has already been entered
and validated.
10
State Transition
Diagram (STD)
A State Transition Diagram should be
provided for the overall process of
adding a meter reading.
10
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 8 of 11
Part 2 – Test plan and Test Results (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.
You should produce the following as part of your testing documentation:
Test
Documentation
Instructions Total Marks
Test Plan You should produce a plan of what is to
be tested and what is the expected
outcome. All functionality should be
tested with pre-determined inputs and
expected outcomes.
8
Test Results Your test results should clearly show
the outputs of the tests and any
remedial action which was taken.
6
Automated Unit
Tests
You should demonstrate the use of
automated unit tests, these can be
used as part of the documentation for
your test results.
** If this is not possible (please state)
you can undertake and demonstrate
different types of tests such as user
experience tests(observations),
accessibility testing; more detailed
testing of requirements and additional
requirements AND/OR use of a model
program with command line
arguments.
6
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 9 of 11
Part 3 – Application (40%)
Application:
The code must be suitably demonstrated for the marks to be awarded for this element.
You should demonstrate knowledge within your report of the code you have created,
this can be done by screenshots and explanations of the code.
You should provide a full listing of your code in an appendix to your coursework and
upload the c file.
Application
Documentation
Instructions Total Marks
Execution You should provide a fully working
program written in the c language,
covering all the application
requirements listed on page 3.
To gain a higher grade. You can
exceed the application requirements,
suggested additional functionality is
listed on page 4, or you may choose to
use some of your own ideas to show
further knowledge and understanding.
20
Usability Screenshots of your code executing to
demonstrate how the user interacts
with the application.
4
Quality Code listing and explanations, evidence
through tests that the code produces
the correct outputs.
8
Evidence of
Comprehension
Documentation should show evidence
of your refinement of code, errors or
issues you came across and how these
were resolved and explanations of
areas of your code.
8
Part 4 – Review (10%)
Review: A suitably written reflective report communicating your learning through the
assignment, the skills you have developed and areas that need further improvement.
Reflection of assignment You should reflect on you r
work throughout the
coursework.
4
Skills Developed Where did you develop
skills – what did you do
well?
3
Areas Requiring further
improvement.
Moving into the future
what would you require to
improve?
3
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 10 of 11
Grading Rubric
Criteria Assessed
Element
Acquisition and application of requisite knowledge
Novice [0 –
39%]
Beginner [ 40
–49%]
Competent
[50 – 59%]
Proficient
[60 – 69%]
Expert [70
– 100%]
Quality of
models.
30%
Pseudo code
(10%) Flow
chart (10%)
STD (10%)
Very poorly
presented
models
inappropriat
e or wholly
ineffective.
Issues with
models which
undermines
the
appropriatenes
s and efficacy.
But there is
clear evidence
of effort in the
attempt and
techniques are
identifiable.
Acceptable
models though
there are
minor issues
with
appropriatenes
s and efficacy
and/or
notational
errors.
No noticeable
limitations in
the models.
Techniques
have been used
to an
appropriate
standard
though there
may be some
minor
omissions or
errors that
reduce the
completeness
of the models.
Models are
extremely
effective and
professionally
presented,
notations
have been
used
appropriately
and the
models wholly
map to the
provided
solution.
Test
documentatio
n
20%
Plan including
reason for
testing,
expected
result, actual
result and
evidence of
remedial
action and
test execution
Very poor
testing,
major
functionality
untested
and/or lack
of any real
plan,
evidence of
execution or
management
.
Basic level of
testing evident
though errors
and omissions
evident and
the plan has
evidence of
test executions
though it is not
convincing in
its application
or
management.
Satisfactory
plan testing
the major
executable
functions of
the system
and evidence
of tests being
executed and
managed but
not
compelling.
Good plan with
significant
majority of the
system tested
as required
with minor
omissions.
Clear evidence
of execution
and
management.
Excellent and
comprehensiv
e plan;
comprehensiv
e evidence of
the tests
being
executed and
managed.
Application
40%
Execution
(50%)
Application is
limited in
features,
poorly
engineered
lacking
robustness
and
extensibility
and rigour.
Application has
most of the
required
features
evident though
lacks thorough
engineering
leading to
insufficient
extensibility
and/or
robustness
with limited
rigour evident.
Acceptable
solution
thorough not
convincingly
engineered
which may
limit
extensibility
and/or
robustness,
rigour is
deficient.
Solution is well
engineered
with evidence
of extensibility.
There may be
some minor
lack of
robustness
and/or
features, or
rigour
Wholly
professional
approach with
solution well-
engineered,
robust and
extensible.
Usability
(10%)
No
interaction
and very
limited
output.
System
functions but
there is no
interaction and
only minimum
output.
Acceptable
usability
though no user
interaction to
load data
and/or very
basic output.
Good, usable
application with
basic user
interface
provide, loads
data as
required and
has the
minimum
output well
displayed.
Excellent,
near
professional
quality
interface and
interactivity.
User has
freedom to
load data and
the outputs
are extensive
with excellent
presentation.
Quality (20%) Program
does not
produce
correct
results; the
standard of
coding is
poor with no
real attempt
to meet a
Code executes
and results are
produced but
they are not
validated
and/or the
standard of
the code is
basic.
Acceptable
quality with
clear evidence
the correct
result is
produced, the
standard of
coding is
acceptable
though there
are clearly
Good quality
throughout, the
application
executes as
required and
results are valid
code quality
has some
issues such as
pretty printing
or naming
Excellent
quality,
executes as
required,
results are
valid and
code is
professionally
presented.
Programming CW
Coursework 2526 © NCUK Ltd. 2526 Page 11 of 11
quality
threshold.
issues with
consistency.
convention not
consistent.
Evidence of
comprehensio
n (20%)
Lacking,
student
appears
unable to
explain the
code and
features
used and
had very
little
evidence of
skills being
acquired and
applied.
Basic evidence
of
comprehension
, can explain
the major
parts of the
program
though lacking
evidence of
understanding
the more
complex
language
features
applied. Skill
level was
sufficient to
complete the
basic tasks but
not more
advanced
work.
Acceptable
though there
are some more
fundamental
areas that the
student is not
so confident
explaining or
has
misunderstood
. They display
the skill level
expected to
succeed with
the
assignment.
Good
knowledge of
the code
though not
comprehensive
or compelling
they are able to
explain the
main features
of the program
and how it
executes and
display an
above average
skill in their
work.
Excellent,
student fully
understood all
the work
submitted,
could explain
the
relationship
between the
model and
the code, the
how the
program
executes and
showed well
above
average and
skill in the
production of
the work.
Review
10%
Degree to
which you
have reflected
appropriately
on the work
you have
produced, the
lessons learnt,
strengths and
weaknesses
etc.
Not a
reflective
account,
details are
presented
as is rather
than
considering
the impact
upon the
learner.
Evidence of
some
reflection
rather than
just a
narrative of
the process
though not
consistent.
Clear
evidence of
reflection
though
lacking depth
and some
objectivity.
Reflection is
evident
throughout
identifying
areas of
development
and skill
acquisition
though minor
inconsistencie
s present.
Deeply
reflective
account with
clear
evidence of
developmen
t and skill
acquisition
along with
evaluation
of previous
skill and
knowledge
deployment.