Sei sulla pagina 1di 7

ICON College of Technology and Management

Course: BTEC HND in ICT Systems


Unit: 3, Programming Concepts, Session: February 2010 Course Work
Maximum 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. 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 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 9 options as listed
from 2.1 to 2.9 below. Use the subsection headings from 2.1 to 2.9 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
o the main menu.

2.1 Hello World (Menu Item 1)


Specification: The function asks the user to enter their first and second names and it prints Hello
World, this is YourFirstName YourSecondNam’s First C++ Project”.

2.2 The ICON Characters (Menu item 2)


Specification: Write a function to print the pattern shown below on the console screen.

***** **** **** * *


* * * * * * *
* * * * * * *
* * * * * * *
***** **** **** * *

2.3 The Area of a Circle (Menu item 3)


Specification: This function calculates the area of a circle. The area of a circle is given by
a  r 2 where a is the area and r is the radius.
Input: The radius of the circle is the input parameter to the function and is entered by the user.
Output: The function returns the area of the circle.

1/7
2.4 The Volume of a Cylinder (Menu item 4)
Specification: This function calculates the volume of a cylinder. The volume of a cylinder is given by
V  r 2 h , where r is the radius of the circular base and h is the height of the cylinder and V is the
volume of the cylinder.
Input: The radius of the circle and the height of the cylinder are inputs to the function and are
entered by the user.
Output: The function returns the volume of the cylinder.

2.5 The Student Examination Results Analysis (Menu item 5)


Specification: The function assigns Pass, Merit, Distinction or Fail against students names entered
with their grades by assuming Fail as <40%, Pass as 40% to 60%, Merit as 61% to 80% and Distinction
for grades >80%. The program should also print the average of all the grades entered. You should
not fix the number of grades entered, it should be decided by the user at run time.

Input: Enter names of students and their grades ranging from 0 to 100.
Output: Prints a table with one column as student name and another column student grade and a
third column with Pass, Merit, Distinction or Fail.

2.6 The National Lottery Number Generator (Menu item 6)


Specification: Write a function to generate six random numbers in the range of 1 to 49 (inclusive).
The number of draws will be decided by the user.
Input: Number of draws
Output: prints six distinct numbers from 1 to 49 inclusive per row.

2.7 The Sum of the Elements of an Array (Menu item 7)


Specification: Write a function that returns the sum of all the elements of an array. The array is
declared and initialised to be an input to the function..
Input: Array.
Output: Sum of elements of the array.

2.8 The Solution of Quadratic Equation (Menu item 8)

Specification: The solution to a quadratic equation of the form ax 2  bx  c  0 is given by the


formula below:
 b  b 2  4ac
x
2a
Where a, b and c are the coefficients of the quadratic equation. You are required to write a function
to find the two solutions of the equation. The above formula only works if a ≠0 and that
b 2  4ac  0 for real roots. Your program must check the above two constrains and take
appropriate action to avoid runtime errors.

Input: Three coefficients of a quadratic equation


Output: Solution of the quadratic equation.

2.9 Exit (Menu item 9)


Specification: This option should allow the user to exit the program.

2.10 The ReadMe File - Complete Program Documentation


This 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.

2/7
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.
*************************************************************************************/

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.

3/7
 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. Unit3CourseWrk3344

4 Summary of Learning Outcomes


1. Design and develop code using structured programming methods
2. Use modularisation appropriate to the chosen programming language
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

4/7
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

5/7
6 Specific Guidelines for Pass/Merit/Distinction

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

7 Preparation Guidelines of the Coursework Document

a. All coursework must be word-processed.


b. Document margins must not be more than 2.54 cm (1 inch) or less than 1.9cm (3/4 inch).
c. Font size must be within the range of 10 point to 14 point including the headings and body text.
d. Standard and commonly used type face such as Times new Roman or Arial etc should be used.
e. All figures, graphs and tables must be numbered.
f. Material taken from external sources must be properly referenced using a standard method
g. Word limit must be strictly followed.

7.1 Plagiarism
Any act of plagiarism will be seriously dealt with according to the regulations. In this context the
definition and scope of plagiarism are presented below:
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; copying another student’s coursework; stealing coursework from another student
and submitting it as your own work. Suspected plagiarism will be investigated and if found to have

6/7
occurred will be dealt with according to the college procedure. (For details on Plagiarism please see
the student hand book)

7.2 Submission
a. All coursework must be submitted to the assigned person and a receipt must be obtained.
b. The copy of the coursework submitted will not be returned to you after marking
c. 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.
d. The student must attach a copy of the question in between the cover page and the answer.

7.3 Good practice


a. Make backup of your work in different media (hard disk, CD, 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

7.4 Extension and Late Submission


a. If you need an extension for a valid reason, you must request one using a coursework extension
request form available from the college. Please note that the lecturers do not have the authority to
extend the coursework deadlines and therefore do not ask them to award a coursework extension.
The completed form must be accompanied by evidence such as a medical certificate in the event of
you being sick.
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.

7/7

Potrebbero piacerti anche