Upload
ravi-gajenthran
View
171
Download
1
Embed Size (px)
DESCRIPTION
PP assignment
Citation preview
BTEC EXTENDED DIPLOMA FOR IT PRACTITIONERS ICT Department
Student’s Name Class
Unit Name and No:
Unit 16: Procedural Programming
Assessor’s Name:
Nic Noble
Assignment Title:
Assignment 1 : Designing, building, testing a procedural program
Assignment No 1 of 1
Issue Date: Due date: IV Reference First Date
Received
Unit Grading Criteria:Please refer to page 3 for details of criteria covered by this assignment.
Criteria Met Pass Merit DistinctionThe criteria applying to this assignment:
P1 P2 P3 P4 P5 P6 M1 M2 M3 M4 D1 D2
Submission 1Submission 2
FOR THIS ASSIGNMENT YOU SHOULD BE HANDING IN:-
Task 1 - What is Procedural Programming? Task 2 - Design your programTask 3 - Developing Procedural ProgramsTask 4 - Creating technical documentationTask 5 - TestingTask 6 – On Screen Help / menuTask 7 – Evaluating Procedural Programs
Bibliography
ScenarioAfter successful completion of a Computer Programming course at your local college, you are about to start work as an apprentice at Programmed Solutions – an IT company creating bespoke programs for small companies using C/C++ programming language. As C/C++ is one of the hardest languages to learn, they would like you to gain experience of programming before you start work. They have suggested you explore this language using an Arduino and a variety of components. They have provided you with an Arduino kit consisting of an Arduino Uno, various electrical components and a breadboard used to assemble the components and build the circuit.
Before you start to build your program you will have to familiarize yourself with basic electronics theory / building circuits.
You aim to spend at least 4 weeks familiarizing yourself with the language and how it is used to control input and output devices connected to the Arduino Uno board. During this time you will demonstrate an understanding of the Key feature of Procedural languages such as:
procedures; functions; pre-defined functions; local variables; global variables; parameter passing; modularity; programming librariesControl structures: e.g. fixed loop, pre-check loop, post-check loop, break-points; conditional commandse.g. if, case, conditional statements, use of Boolean operators, Control structures: e.g. fixed loop, pre-check loop, post-check loop
When you return to work you will be given help to choose an appropriate project . This project you will allow you to demonstrate your understanding of C/C++ and procedural languages. This will be used to assess whether you have the necessary skills to make a successful career as a programmer
Task 1: What is Procedural Programming? (p1, p2)
Arduino is based on a microcontroller which can be used to control electric circuits using program code. To complete this task you will need to be able to :
Build Circuits
Know how each component works, Select appropriate components for the circuit and be able to connect them safely.
Program
Write program code to control the circuit using C, compile the code and transfer it to the Arduino Chip, run and test it
Note: to be able to access distinction criteria you will have to use your initiative to create complex control systems showing original ideas and code
You will need to demonstrate your understanding of Procedural programs by referring to your own code and the code examples provided in the p1 & p2 section of Moodle.
Save your work as p1p2 and submit via Moodle link
P1 explain the key features of procedural programsP2 demonstrate the use of procedural tools and techniques
Task 2 : Design your program
Having chosen your project, you are required to create a design to demonstrate what will be happening in the project.
Part 1
Write a couple of paragraphs explaining what your parking sensor will look like and how it will work
Part 2
Create a flow chart to demonstrate the inputs, processing and outputs in your parking sensor program and identify various constructs such as iterations i.e. any loops you have used e.g. for, do while, while, any Selects you have used e.g. if, else if, Select case etc. Here is an example of a typical Flow chart which shows how the data flows in the circuit:
Enter First Name
Enter Surname
Enter Hours Worked
If hours worked <=36
Hours worked x 7.45
Deduct tax 0.2
Deduct national insurance 0.07
Put into salary form
If hours worked <=44
Hours worked 36 x 7.45 + (Hoursworked - 36) x 10.32
Yes
Yes
No
No
Basic Pay
Higher Pay
Save your work as p3 and submit via Moodle link
P3 Design a procedural application to meet defined requirements
Task 3: Developing Procedural Programs
Most programmers share code and develop code into more complicated programs rather than having to write code from scratch e.g. a program controlling the way landscape is generated in an XBOX game will be re-used / adapted to be used in other games. So program design / structure is very important. Now that you have got a basic understanding of procedural programming, you need to look at how you structure your code and make sure it is easy to read, easy to adapt and extend. Create a report to show this good practice (m1) and explain why these techniques are important in procedural programs in general (m2)
p4 will be marked by tutor as a witness statement, m1 and m2 to be submitted separately on Moodle
P4 Implement a working procedural application to meet defined requirements
M1 explain why modular elements are important for procedural Programming
M2 give reasons for the tools and techniques used in the production of a procedural application
Task 4: Creating Technical Documentation
Throughout your work, you will have encountered errors with the circuit, errors when you compile the code and code that compiles but doesn’t control the circuit as you expected. You will need to keep a record of such testing by creating technical documentation to include :
If hours worked <=68
Hours worked 36 x 7.45 + 8 x 10.32 + (Hoursworked - 44) x 15.66
Yes
Highest Pay
Part 1
Description of System :
You will need to describe what is happening in your program by referring to what is going on the circuit – inputs and outputs and processing that is being carried out e.g. The system uses 6 LED connecting to a resistor so that the LED does not burn out. A potentiometer controls the amount of current flowing in the circuit. It is connected to the input A0 pin which reads the analogue value between 0 and 255. The code controls the LED flashes the number stored in a variable. E.g. if the number is 5 it will flash 5 times – on for a second then off for a second …..
Part 2
Create Circuit Diagram
Most electronic projects include a schematic that will make it easier to build the circuit.
Or you can chose to create a your own circuit as shown below :
Circuit Diagram :
You will be creating a diagram of your circuit using Abode Fireworks. You will be provided with all the images of all the components – see m4 Create Technical documentation section of Moodle – creating circuit diagram
Part 3
Annotation of your code
Each line of code will need to be explained to show your understanding of the code you have written and to help others understand your code and so be baler to develop your code further or understand any bugs in your codes
You will provide screen shots of your code and your annotation as above
M4 create technical documentation for the support and maintenance of a computer program
You will save this work as m4 and submit via Moodle
Task 5 : Testing
Part 1
Create a test table to show you have tested your code and components
Part 2Object /Event to be
Tested Expected Actual Success
?Changes made
Potentiometer turned to O
No LEDs to light up
No LEDs to light up
Yes None Required
Potentiometer turned to maximum
Each LED that lights is fully bright
Each LED that lights is fully bright
Yes None Required
Potentiometer turned half way
Each LED is moderate brightness
LED looks like it is off
No LEDs do not respond to
changes in current like a light bulb.
Could have replaced with a more sensitive
lightDistance Sensor
reads 8All leds are on No, one of
the led connected to
pin 2 is off
No Reconnect led connected the
wrong way round
Distance Sensor Distance Sensor reads
distances
No values on screen
No Distance connected not connected up properly – red
write move to 5 v instead of ground
(GND)
Screen shots to show errors when you compiled your code and proof you have corrected the errors e.g.
You will need to analyse your test results and identify problems and find solutions to these (m3). Without this analysis you will just achieve P6
P5 test a procedural application
M3 analyse actual test results against expected results to identify discrepancies
You will save this work as p5 m3 and submit via Moodle
Task 6: On screen help / menu
Having created your project and found it to working as expected, you now need to output text to the serial monitor / lcd display to be displayed when the parking sensor first comes on. This could be some information about the parking sensor and possibly a menu enabling the user to control some aspects of the parking sensor e.g. turn the sound on and off , make the sensor more sensitive for less confident drivers etc.
You will save this work as p6 and submit via Moodle
Task 7: Evaluating Procedural Programs
Having had experience of writing procedural code in C++ using Visual studio and using the Arduino software ( which is similar to C++), you have to evaluate and compare the two in terms of :
how they handle procedural code
tools and techniques you used and the general tools and techniques available in the application
ease of use
their capacity and limitations
is it fair to compare Visual C++ with Arduino software ?
D2 evaluate a procedural application.
D1 evaluate the suitability of procedural programs for graphical applications
This Unit is Internally Assessed
In order to pass this assignment, the evidence that you present for assessment needs to demonstrate that you can meet all the assessment criteria.
Grading Criteria
Presentation of Work
CriteriaAssign 1 (Tick if met)
P1explain the key features ofprocedural programs
P2demonstrate the useof procedural tools andtechniques
P3design a proceduralapplication to meet definedrequirements
P4implement a workingprocedural application tomeet defined requirements
P5 test a procedural application
P6create onscreen help to assistthe users of a computerprogram.
M1explain why modularelements are important forprocedural programming
M2
give reasons for the toolsand techniques used in theproduction of a proceduralapplication
M3analyse actual test resultsagainst expected results toidentify discrepancies
M4
create technicaldocumentation for thesupport and maintenance of acomputer program.
D1evaluate the suitability ofprocedural programs forgraphical applications
D2evaluate a proceduralapplication.
Your work will be the Prezi presentation which is stored in your own Prezi web area.
Learning Outcomes
Be able to learn how to build a Prezi Presentation by following the many tutorials on the internet
Use multimedia within your presentation to demonstrate how multimedia can be used in businesses
Handout date:
Hand in date:
Textbooks