Course Work Programming Concepts[1]

  • Published on

  • View

  • Download


<p>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</p> <p>Title: Programming Concepts Coursework1 ObjectiveThis 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.</p> <p>2 Program SpecificationThe 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)</p> <p>Specification: The function asks the user to enter their first and second names and it prints Hello World, this is YourFirstName YourSecondNams First C++ Project.2.2 The ICON Characters (Menu item 2)</p> <p>Specification: Write a function to print the pattern shown below on the console screen. ***** * * * *****2.3</p> <p>**** * * * ****</p> <p>**** * * * * * * ****</p> <p>* * * * * * * * * * * * *</p> <p>The Area of a Circle (Menu item 3)</p> <p>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.</p> <p>1/7</p> <p>2.4</p> <p>The Volume of a Cylinder (Menu item 4)</p> <p>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)</p> <p>Specification: The function assigns Pass, Merit, Distinction or Fail against students names entered with their grades by assuming Fail as 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)</p> <p>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)</p> <p>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)</p> <p>Specification: The solution to a quadratic equation of the form ax 2 bx c 0 is given by the formula below:</p> <p>x</p> <p> b b 2 4ac 2a</p> <p>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)</p> <p>Specification: This option should allow the user to exit the program.2.10 The ReadMe File - Complete Program Documentation</p> <p>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.</p> <p>2/7</p> <p>3 Additional Specs, Hints &amp; 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.</p> <p>/************************************************************************************* 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 *************************************************************************************/</p> <p>Each function must have its own comment heading which describes exactly what the code does as shown below as an example.</p> <p>/************************************************************************************* About: This program takes your date of birth as an input and returns your age. *************************************************************************************/</p> <p>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.</p> <p>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 students 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.</p> <p>3/7</p> <p>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.</p> <p>Finally give the project a sensible name like Unit3CoursewrkStudentID E.g. Unit3CourseWrk3344</p> <p>4 Summary of Learning Outcomes1. 2. 3. 4. Design and develop code using structured programming methods Use modularisation appropriate to the chosen programming language Produce appropriate documentation for a given program application Create and apply appropriate test schedules.</p> <p>Outcomes</p> <p>Design and develop code using structured programming methods</p> <p>Use modularisation appropriate to the chosen programming language</p> <p>Produce appropriate documentation for a given program application 4 Create and apply appropriate test schedules</p> <p>Assessment criteria for pass To achieve each outcome a learner must demonstrate the ability to: identify and select appropriate pre-defined data types use simple input/output and appropriate operators with the above identify and use appropriate selection structures and loop structures for the given task produce programs to desired standards construct a program from a design and use appropriate functions/procedures demonstrate the effect of scope and lifetime of variables pass data effectively between modules produce user documentation for a completed programming application including the user interface design develop documentation for a predescribed program application demonstrate discrimination between semantic and syntax errors produce test documentation successfully construct and use test data and schedules to detect logic errors use appropriate techniques for detecting errors</p> <p>Tasks/questions reflecting the outcome 2.1 2.9</p> <p>2.1 2.9</p> <p>2.10</p> <p>2.1 2.9</p> <p>4/7</p> <p>5</p> <p>Grading Criteria of this Coursework (Overall)Merit a. Pass requirement achieved. b. Substantial concepts on the subject matter covered by the questions in the coursework have been demonstrated. c. Strategies to find appropriate solutions to solve the problems in the coursework have been identified and applied. d. Appropriate decision has been made after comparative analysis has been done. e. Appropriate findings have been presented to demonstrate the clear understanding Distinction a. Pass and Merit Requirement achieved and b. First-rate concept of the subject matter covered by the questions in the coursework has been demonstrated. c. Critical reflection to evaluate own work and justify valid conclusions on the basis f the results obtained in the case of each of the problems in the coursework is evident. d. Critical evaluation of the products recommended and come up with conclusive statements to justify the recommendations.</p> <p>Pass a. All outcomes and associated assessment criteria have been met. b. Reasonable concepts on the subject covered by the questions in the coursework have been demonstrated in own words. c. Listed all references c. TCA (in the form of Examination) has been passed.</p> <p>5/7</p> <p>6</p> <p>Specific Guidelines for Pass/Merit/DistinctionPass Merit - Basic understanding of - Pass criteria met. Structured programming -Substantial knowledge of the operation of structured programming and understanding of the advantages of structured programming techniques. Basic understanding of - Pass criteria met modularisation -Substantial knowledge of modularisation Basic understanding of the - Pass criteria met documentation involved in -Substantial programming understanding of the documentation involved. Basic understanding of -Pass criteria met creating effective software -Substantial test schedules understanding of creating effective software test schedules Distinction - Pass and Merit criteria met Demonstrate in-depth knowledge of the structured programming methods and the implementation and the advantages of structured programming</p> <p>Design and develop code using structured programming methods</p> <p>Use modularisation appropriate to the chosen programming language Produce appropriate documentation for a given program application Create and apply appropriate test schedules</p> <p>- Pass and merit criteria met -Demonstrate in-depth knowledge of modularisation</p> <p>- Pass and merit criteria met -Demonstrate in-dpeth understanding of Software documentation. -Pass and merit criteria met -Demonstrate in-depth knowledge and understanding of creating and implementing software test schedules</p> <p>7</p> <p>Preparation Guidelines of the Coursework Document</p> <p>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</p> <p>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 elses 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 students coursework; stealing coursework from another student and submitting it as your own work. Suspected plagiarism will be investigated and if found to have</p> <p>6/7</p> <p>occurred will be dealt with according to the college procedure. (For details on Plagiarism please see the student hand book)7.2 Submission</p> <p>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</p> <p>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 use7.4 Extension and Late Submission</p> <p>a. If you need an extension for a valid reason, you must request one using a coursework extension request form available from the colleg...</p>


View more >