KF4006 Procedural Programming Assignment 2

Verified

Added on  2019/09/16

|4
|1443
|185
Homework Assignment
AI Summary
This document outlines the requirements for the Procedural Programming Assignment 2 for the KF4006 module at Northumbria University. The assignment requires students to implement a 'Pennies' game in both C++ and another chosen language (Ruby, Perl, BASIC, Python, Javascript, or Processingjs), and to write an essay comparing the use of loops in the two implementations. The assignment is worth 20% of the module grade and is due on November 24th, 2016. The document also includes detailed marking criteria for both the code and the essay components.
Document Page
COURSEWORK ASSESSMENT SPECIFICATION
Module Title: Procedural programming
Module Number: KF4006
Module Tutor
Name(s):
Chris Rook
Academic Year: 2016-2017
% Weighting (to
overall module):
20%
Coursework Title: Procedural programming assignment 2
Average Study
Time Required by
Student:
20 study hours
Dates and Mechanisms for Assessment Submission and Feedback
Date of Handout to Students:
17th October 2016
Mechanism for Handout to Students:
Via eLearning Portal
Date and Time of Submission by Student:
24th November 2016 11pm.
Mechanism for Submission of Work by Student:
1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Submit your code and essay to the link on the eLearning portal by 11pm on the 24th
November 2016.
You should not submit program executables – only the code that is required to build them.
You will submit a single document. First paste the C++ code into the document, then paste
the code for your other language. Make it clear which language you have used.
Finally, include your essay.
Northumbria University uses anonymous marking where possible, so do not put your name
on the document.
Date by which Work, Feedback and Marks will be returned to Students:
15th December 2016
Mechanism for return of assignment work, feedback and marks to students:
Marks will be available on the Blackboard grade book. You will receive feedback via email.
This assessment is worth 20% of the total module mark.
This assignment contributes to the assessment of the following learning outcomes:
Demonstrate an understanding of the basic principles of procedural programming using an
appropriate programming language, including the use of variables, conditions, loops,
subprograms.
Compare and evaluate procedural programming languages.
This is an individual assignment. You may not collude with any other individual or plagiarise their
work. Suspected collusion or plagiarism will be dealt with according to the University of
Northumbria's assessment regulations. Assessment regulations are in the document “Assessment
regulations for Northumbria Awards” and can be found on the University’s website at:
https://www.northumbria.ac.uk/sd/central/ar/qualitysupport/assessment/
Task 1 (50%)
You should write code to implement the program detailed below. You should implement this TWICE
– once in C++ and once in another programming language. You may choose the other programming
language from: Ruby, Perl, BASIC, Python, Javascript, Processingjs.
Task 2 (50%)
You should write a short essay comparing the use of loops in the two programs you have created for
task 1. You should discuss:
Differences in the way that loops are used and written in the two languages.
A discussion of which approach you feel is best, with reasons.
2
Document Page
You should limit the discussion to the code you have written, so do not discuss any syntax that you
have not used. If you use sources of information, you should reference them correctly. Please use
http://www.citethemrightonline.com/ for information on how to reference sources.
The word limit for this essay is 455 words. You are allowed to go over the word limit by up to 10%
without penalty. (So in this case, you can write up to 500 words). If you exceed this, the mark for this
assignment will drop by 5%. (So if you got a mark of 75%, this would drop to 70%).
The program
Your program will allow the user to play a game of “Pennies” against the computer. The game starts
with 20 pennies arranged in a row. Each player takes it in turn to remove between 1 and 5 pennies.
The loser is the person who removes the final penny.
When running the game, the player can choose whether to make the first move, or ask the
computer to.
When it is the player’s turn, the player can choose between 1 and 5 pennies. The program should
prevent the player from removing any other number of pennies.
When it is the computer’s turn, the computer will remove a random number of pennies – from 1 to
5. The exception is when there are fewer than 7 pennies left. In this case, the computer should
remove the correct number of pennies to win the game. The program should let the player know
how many pennies were taken.
Before each turn, the program should display the number of pennies remaining, both as a number
and by showing a line of circles to represent pennies. For example:
Pennies remaining: 12 oooooooooooo
At the end of the game, the program should say who won. It should then allow the user to either
play another game or quit the program. The program should keep track of how many times the
player has won and how many times the player has lost. This should be displayed when the player
chooses to quit the program.
Notes on code style
You are expected to follow the style guidelines for C++, which are available on Blackboard. If you
don’t follow the guidelines, this may affect your marks, as noted in the mark scheme below.
The style guide asks you to include comments at the top of your code. This would normally include
your name. However, to allow for anonymous marking, please put only your student ID number.
The style rules may not apply to the other language that you are using. However, you code should be
neat, well-structured and commented.
Mark scheme
The assignment is marked out of 20.
3
Document Page
C++ program - 5 marks
5 A program that completely implements the description above and follows the style rules
used in the module. There are no errors in the program. The user is given appropriate
information and guidance.
4 A complete program that has only minor errors or deviation from the style rules. Some user
guidance may be incomplete.
3 The program allows the user to play the game, but features specified in the description
above are missing. There may be errors in the code style and user interaction may be
unhelpful.
2 A working program that partially implements the description above, but has significant
omissions. There may be serious deviations from the code style or user interaction may be
obstructive.
1 The program is incomplete, but contains useful code that could be developed to a working
program.
0 Program is not submitted or contains little useful code.
Program in other language - 5 marks
5 A program that completely implements the description above. There are no errors in the
program. The user is given appropriate information and guidance.
4 A complete program that has only minor errors. Some user guidance may be incomplete.
3 The program allows the user to play the game, but features specified in the description
above are missing. User interaction may be unhelpful.
2 A working program that partially implements the description above, but has significant
omissions. User interaction may be obstructive.
1 The program is incomplete, but contains useful code that could be developed to a working
program.
0 Program is not submitted or contains little useful code.
Discussion of loop mechanisms – 10 marks
9-10 A full discussion of all features of the loops used in the program, including an insightful
evaluation of the two mechanisms leading to a well-reasoned comparison.
7-8 A discussion of all features of the loops used in the program. Some useful comparisons have
been drawn, showing a reflective comparison of the two languages.
5-6 Most features of the loop mechanisms have been discussed. The student has made some
attempt to discuss relative merits, but without much insight.
3-4 An incomplete discussion of the differences between the loop mechanisms, or the student
has made no real attempt to compare the two.
1-2 Some differences between the loop mechanisms are stated, but without much discussion.
0 Discussion was not submitted or contains very little useful information.
4
chevron_up_icon
1 out of 4
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]