CW Programming Concepts Sept 2010
CW Programming Concepts Sept 2010
ICON College of Technology and Management
Course: BTEC HND in ICT Systems
Unit: 3, Programming Concepts,
Session: September 2010
Course Work
word limit: 3000
Title: Programming Concepts Coursework
1 Objective
This coursework requires the student to produce a menu driven console program. The program is
structured so that it tests the students’ knowledge in various areas of structured programming using
C++. Each student is expected to produce a single program which comprises the various tasks listed
here in this coursework. Where appropriate, each task should be written as a function to
emphasise modularity of your program. Each student is expected to hand in a full source code and
associated documentation in a CD as well as printed program documentation. The CD must contain
everything necessary to run the program within Microsoft Visual C++ 2008 (or later) express edition
environment, i.e. it must be the full project folder, not just the source code.
2 Program Specification
The program will have a menu system from which the user selects. There will be 8 options as listed
from 2.1 to 2.8 below. Use the subsection headings from 2.1 to 2.8 as the menu item title. Each
option will implement a specific task in the work as listed below. On selection of an option from the
main menu, the program executes that option and waits for the user to press a key before returning
to the main menu. The main menu selection system should be implemented using Switch
Statement.
Specification: The function asks the user to enter their first name, second name, date of birth,
nationality and Prints out the details in the format shown below.
First Name:
Second Name:
ICON College of Technology & Management
DOB:
Nationality:
Specification: Write a program which will read the number of a month and assuming that it is not a
leap year, will print the number of days in the month.
Specification: Write a function to draw the pattern below occupying n lines where n is supplied as an
input. For example if n = 20,
#
##
###
#####
#######
#########
############
##############
################
###################
#
##
###
#####
#######
#########
############
##############
################
###################
Specification: A manufacturer has two identical machines, each of which is producing brake discs for
small cars. The diameter of a sample of 10 disks from the first machine is to be typed as input to a
ICON College of Technology & Management
computer program and are to be followed by the diameters of a sample of 10 discs from the second
machine. Write a program which accepts the two sets of measurements and displays all 20 numbers
plus the average diameters of each of the 10 discs plus their overall average.
No Machine 1 Machine 2
1
2
etc
Average
Specification: Write a program which calculates the Sine, Cosine and Tangent of all angles from 0 to
360 in increments of 45 degrees and display the result in a tabular format. The angles must be
initialised in an array. Your program should print a message if the values are not real numbers
Angle Sine Cosine Tangent
Specification: Voting takes place for two political parties in a number of constituencies. The two vote
totals for each constituency are types in pairs as input to the program and two negative numbers are
typed in the input when all pairs of totals have been types. Write a program which adds up the
overall totals for the two parties and reports the overall wining result.
Specification: ICON College monitors students’ attendance and reports students to the UKBA if their
attendance is below 90%. Write a program which will take unknown number of students’ attendance
percentage along with their student ID and name and prints Report to UKBA or Good Student against
their names as shown below.
Specification: This option should allow the user to exit the program.
Ps. After execution of every item in the menu list, the program should display the menu on the
screen again, thus until the EXIT menu is selected, the program should not terminate.
ICON College of Technology & Management
This word file will constitute as part of your assessment for the completion of the coursework. In this
file, all the functional elements of the program must be explained. Flow diagrams of each task as well
as that of the overall task must be shown as part of the design process.
3 Additional Specs, Hints & Good Programming Practices
The marking scheme for this coursework will assign marks for Functionality, Quality of Code,
Program Design, Style, Documentation and Working Binaries. Style and Documentation are
crucial – you must neatly comment your code.
Try and break the coursework down into do‐able chunks as identified by the task list. These
are distinct programs in the coursework, so try and modularise your effort – for instance ‐
first you need to set up the menu system and build functionalities of each menu item one by
one. This approach will help in the testing and debugging process of your code.
DEBUGGING HINT: Compile and test your program after every change, even if it was as
simple a change as adding a single line. This will allow you to find and fix errors early
before you write more code. This is another reason why you have to write the skeleton
program which runs first even if it does not do anything yet.
Your main program should have the following heading shown below. You must customise it
to your particular details.
/*************************************************************************************
About: This program is written as part of the fulfilment for the Programming Concepts
Course ‐ HND in ICT Systems at Icon College, London.
Date : Put date here
By : Put your name here. Student ID: Put your student ID Here
Tutor: Y M Gebremichael
*************************************************************************************/
Each function must have its own comment heading which describes exactly what the code
does as shown below as an example.
/*************************************************************************************
About: This program takes your date of birth as an input and returns your age.
*************************************************************************************/
ICON College of Technology & Management
In addition to the above, follow good programming practices. Below are some of the common good
practices generally accepted as industry standard and followed by those in industry who are using
programming in general and the C/C++ in particular. You will get more marks for following good
programming practices. Some examples are given below.
When naming identifiers,
o Do not start with underscore (used for technical programming). e.g. _grades (this is
bad practice)
o Write single word variables in all lower case , e.g. int grades, roots;
o Space is not allowed in identifiers, e.g. ‘student grades’ is wrong! write this as
studenGrades or student_grades. Note the use of capitalisation or the underscore.
o Use CAPILAT LETTERS TO DECLARE CONSTANTS, e.g. PI = 3.14, SIZE = 100;
o Start function names with capital letters. e.g. AverageGrades(). Spaces are not
allowed in function names. ‘Average Grades()’ is wrong. Use AverageGrades() or
Average_grades().
Make a habit of using Meaningful identifier and Function Names to make your code easier
for others to understand. Think about it, what does "g" mean? Is it grades, garbage, grave,
etc. Thus do not use cryptic identifier names, e.g. Use ‘grades’ to refer to student grades
rather than ‘g’. Similarly, use sensible function names. If you want to write a function that
assigns student’s grades, then call it StudentGrades(). Do not use your names or names of
your pets or any name that does not describe what the function does, but at the same time
do not use more than 3 words, i.e. do not use a sentence to name a function. e.g.
ThisIsMyAverageFunction() while syntactically correct is not good programming practice.
Remember C/C++ is case sensitive so ‘Grades’ and ‘grades’ are not the same as identifier
names. Thus be case and spelling consistent. Use an identifier name only once and spell it
(upper and lower case) the same way within your program.
Finally give the project a sensible name like Unit3CoursewrkStudentID E.g. Unit3CourseWrk9999
4 Summary of Learning Outcomes
1. Design and develop code using structured programming methods
2. Use modularisation appropriate to the chosen programming language
ICON College of Technology & Management
3. Produce appropriate documentation for a given program application
4. Create and apply appropriate test schedules.
Outcomes Assessment criteria for pass Tasks/questions
To achieve each outcome a learner must reflecting the
demonstrate the ability to: outcome
Design and develop code identify and select appropriate pre-defined 2.1 – 2.9
using data types
structured programming use simple input/output and appropriate
methods operators with the above
identify and use appropriate selection
structures and loop structures for the given
task
produce programs to desired standards
Use modularisation construct a program from a design and use 2.1 – 2.9
appropriate to the chosen appropriate functions/procedures
programming language demonstrate the effect of scope and life-
time of variables
pass data effectively between modules
Produce appropriate produce user documentation for a completed 2.10
documentation for a programming application including the user
given interface design
program application develop documentation for a predescribed
program application
4 Create and apply demonstrate discrimination between 2.1 – 2.9
appropriate semantic and syntax errors
test schedules produce test documentation
successfully construct and use test data and
schedules to detect logic errors
use appropriate techniques for detecting
errors
ICON College of Technology & Management
5. Grading Criteria of this Coursework (Overall)
Pass Merit Distinction
a. All outcomes and a. Pass requirement achieved. a. Pass and Merit Requirement achieved
associated assessment b. Substantial concepts on the and
criteria have been met. subject matter covered by the b. First‐rate concept of the subject
b. Reasonable concepts on questions in the coursework have matter covered by the questions in the
the subject covered by the been demonstrated. coursework has been demonstrated.
questions in the c. Strategies to find appropriate c. Critical reflection to evaluate own
coursework have been solutions to solve the problems in work and justify valid conclusions on
demonstrated in own the coursework have been the basis f the results obtained in the
words. identified and applied. case of each of the problems in the
c. Listed all references d. Appropriate decision has been coursework is evident.
c. TCA (in the form of made after comparative analysis d. Critical evaluation of the products
Examination) has been has been done. recommended and come up with
passed. e. Appropriate findings have been conclusive statements to justify the
presented to demonstrate the recommendations.
clear understanding
ICON College of Technology & Management
6.Specific Guidelines for Pass/Merit/Distinction
4. Preparation guidelines of the Coursework Document
Pass Merit Distinction
Design and develop ‐ Basic understanding of ‐ Pass criteria met. ‐ Pass and Merit criteria met
code using Structured programming ‐Substantial
structured knowledge of the ‐ Demonstrate in‐depth
programming operation of knowledge of the structured
methods structured programming methods and
programming and the implementation and the
understanding of advantages of structured
the advantages of programming
structured
programming
techniques.
Use Basic understanding of ‐ Pass criteria met ‐ Pass and merit criteria met
modularisation modularisation ‐Substantial ‐Demonstrate in‐depth
appropriate to the knowledge of knowledge of modularisation
chosen modularisation
programming
language
Produce appropriate Basic understanding of the ‐ Pass criteria met ‐ Pass and merit criteria met
documentation for documentation involved in ‐Substantial ‐Demonstrate in‐dpeth
a given program programming understanding of understanding of
application the documentation Software documentation.
involved.
Create and apply Basic understanding of ‐Pass criteria met ‐Pass and merit criteria met
appropriate creating effective software ‐Substantial ‐Demonstrate in‐depth
test schedules test schedules understanding of knowledge and understanding
creating effective of creating and implementing
software test software test schedules
schedules
ICON College of Technology & Management
4. Preparation guidelines of the Coursework Document
Plagiarism is presenting somebody else’s work as your own. It includes copying information directly
from the Web or books without referencing the material; submitting joint coursework as an individual
effort.
Collusion is copying another student’s coursework; stealing coursework from another student and
submitting it as your own work.
Suspected plagiarism or collusion will be investigated and if found to have occurred will be dealt with
according to the college procedure.(For details on Plagiarism & Collusion please see the student
hand book)
6. Submission
a. Initial submission of coursework to the tutors is compulsory in each unit of the course.
b. Students must attach their initial feedback copy with their final submission of the
coursework. The exam office will not receive any final coursework without initial feedback.
c. Student must check their assignments on Moodle site with plagiarism software TurnItIn and
obtain a
certificate. The student soft copy of assignment should remain in the Moodle site.
c. All Final coursework must be submitted to the assigned person (not to the Tutor) and a
receipt must be obtained. Under no circumstances other College staff accepts them.
d. The copy of the coursework submitted will not be returned to you after marking.
e. Any computer files generated such as program code (software), graphic files that form part of
the coursework must be submitted on a floppy disc or CD together with the documentation.
f. The student must attach a copy of the question in between the cover page and the answer.
7. Good practice
a. Make backup of your work in different media (hard disk, floppy disk, memory stick etc) to
avoid distress for loss or damage of your original copy.
b. Make an extra hardcopy of your work submitted for your own reference or later use
b. Late submission will be accepted and marked according to the college procedure. It is noted that
late submission may result in lower grade or rejection.
ICON College of Technology & Management
9. Submission deadlines
Initial Submission 1 Dec 2010
Feedback given 8 Dec 2010
Final Submission 14 Dec 2010
ICON College of Technology & Management