Assignment title: Information
Unit: Programming Concepts
Unit Level: H1
Unit Code: PRC
Student Name: Date of Issue: 01 February 2016
Student ID: Date of Submission: 28 April 2016
Coursework Regulations
1. All coursework must be submitted via www.stpmoodle.net
1. Please check the submission date and time and ensure that coursework is submitted on time.
1. Requests for an extension must be in accordance with the guidelines set out in the college regulations, with the necessary documentary evidence to support your request. Refer to The Student Handbook.
1. General guidelines for submission of coursework:
• All work must be word-processed and must be of a "good" standard.
• Document margins should not be more than 2.5cm or less than 1.5cm.
c) Font size in the range of 11 to 14 points distributed to including headings and body text. Preferred typeface to be of a common standard such as Arial, Calibri or Times New Roman for the main text.
• All work completed including any software constructed may not be used for any purpose other than the purpose of intended study without prior written permission from St Patrick's College.
Remember to keep evidence of your submitted coursework.
Assignment front sheet
Qualification Unit number and Title
Pearson BTEC HND Diploma Programming Concepts (PRC)
Student name Assessor name
Date issued Completion date Submitted on
01 February 2016 28 April 2016
Assignment title Assignment: Programming Concepts
LO Learning outcome
(LO) Assessment Criteria
(AC) In this assessment you will have the opportunity to present evidence that shows you are able to: Task no. Evidence
(Page no)
LO 1 Design and develop
code using structured programming methods 1.1 Identify and select appropriate pre-defined data types 1
1.2 Use simple input/output and appropriate operators with the above 1
1.3 Identify and use appropriate selection structures and loop structures for the given task 2
1.4 Produce programs to desired standards 2
LO 2 Use modularization
appropriate to the chosen programming language 2.1 Construct a program from a design and use appropriate functions/procedures 3
2.2 Demonstrate the effect of scope and life-time of variables 2
2.3 Pass data effectively between modules 2
LO 3
Produce appropriate
documentation for a
given program application
3.1 Produce user documentation for a completed programming application including the user interface design 3
3.2 Develop documentation for a pre-described program application 3
Create and apply
appropriate
test schedules 4.1 Demonstrate discrimination between semantic and syntax errors 3
4.2 Produce test documentation 3
4.3 Successfully construct and use test data and schedules to detect logic errors 3
4.4 Use appropriate techniques for detecting errors 3
Learner declaration
I certify that the work submitted for this assignment is my own and research sources are fully acknowledged.
Student signature: Date:
Assignment Tasks
Task 1. Task Number
Pre-defined data types and input/output in Java 1 of 3
Aim of the Task
This task will assess your understanding of pre-defined data types in Java, your familiarity with input/output mechanisms by writing program code using pre-defined data types, taking input from the user and producing outputs.
Learning Outcome(s) of the Task
• Identify and select appropriate pre-defined data types (1.1)
• Use simple input/output and appropriate operators with the above (1.2)
Questions:
Give BRIEF answers to the following:
• Define the following programming terms: variable, constant, data type.
• How is a String variable different from char variable?
• What is the difference between short int and long int data types?
• Describe the process of declaring a variable. How is it done and what happens when declaration code is executed?
Write the following Programs:
• Write a Java program to perform basic arithmetic operations (addition and subtraction) on two numbers. Numbers are assumed to be integers and will be entered by the user.
• Write a program that prompts a user to enter a number for the radius of a circle, then computes the area and circumference of the circle. Formula Area= π r², circumference = 2* π r.
• Asks the user to enter studentID, Name, Sex, Age, and Height in meters; Stores these in variables of appropriate data types and presents them together to the user. e.g.
StudentID:p1001215
Name: James
Sex: M
Age: 25
Height: 1.75 meters
Task 2. Task Number
Iteration Statements, Control Statement 2 of 3
Aim of the Task
This task will assess your understand of iteration/Loop and selection statements and demonstrate an understanding by describing code structures and writing program code.
Learning Outcome(s) of the Task
• Identify and use appropriate selection structures and loop structures for the given task (1.3)
• Produce programs to desired standards (1.4)
• Demonstrate the effect of scope and life-time of variables (2.2)
• Pass data effectively between modules (2.3)
Questions:
Give BRIEF answers to the following:
• Describe if and switch statements, highlight their differences and provide examples.
• How does a for loop work?
• How does a while and a do while loop work?
• Explain the difference between while and do-while loop structures?
Write the following Programs:
• Write a program to prompt a user to enter three numbers, then return the largest of three numbers.
• Write a program to prompt a user to input a day (Monday, Tuesday, etc) then state whether the day is a weekday or a weekend. You should use a switch statement to accomplish this.
• To print the first 50 numbers in the Fibonacci series. (Hint: You will need a loop and consider which data type to use)
Task 3 Task Number
Array, Documentation & Testing 3 of 3
Aim of the Task
This task will assess your understand of using Arrays, testing and program documentation.
Learning Outcome(s) of the Task
• Construct a program from a design and use appropriate functions/procedures (2.1)
• Produce user documentation for a completed programming application including the user interface design. (3.1)
• Develop documentation for a pre-described program application (3.2)
• Demonstrate discrimination between semantic and syntax errors (4.1)
• Produce test documentation. (4.2)
• Successfully construct and use test data and schedules to detect logic errors. (4.3)
• Use appropriate techniques for detecting errors. (4.4)
Questions:
Give BRIEF answers to the following:
• Describe arrays and 2 dimensional arrays.
• What is the difference between semantic and syntax errors? Provide examples.
• Describe how to detect errors within a program and define a test plan to be used with one of the programs below. Implement the test plan to identify errors within one of the programs below.
• Examine the following code and provide program documentation to accompany it:
Write the following Programs:
• Write a program to simulate flipping a coin one thousand times then print out how many times a tail and how many times a head was flipped. (Hint: you will need to use Math.random() function)
• Design (draw a layout for the user interface and write Pseudo code) and create a program with a user interface allowing a user to enter ten numbers. Store the numbers in an array and output the highest, lowest and average value of the ten numbers.
• Provide user documentation for the program created for question 6.
In addition to the above PASS criteria, this assignment gives you the opportunity to submit evidence in order to achieve the following MERIT and DISTINCTION grades
Grade Descriptor
Indicative characteristic/s
Contextualisation
M1. Identify and apply variables and data types to appropriate solutions • Effective judgements have been made
• An effective approach to study and research has been applied
To achieve M1 effective judgements will have to be made in order to accurately identify and apply the variables and data types to the given scenario.
Task 1
M2. Understanding and Applying conditional statements and loops • Appropriate conditional statement and loops are used to achieve the best possible result using java programming language
To achieve M2 you must produce documentation to set format i.e. providing explanation for the task and corresponding java code.
Appropriate technical language has been used throughout.
Task 2
D1. Use critical thinking to apply loops, Arrays and functions to solve a given problem Java code provided using appropriate functions, Arrays and loops where necessary.
To achieve D1 Analysis and evaluation will have been carried out to show understanding of the combining loops, conditional statements and functions
Tasks 2, 3
D2. Demonstrate error detecting and testing techniques Good skills of identifying different types of errors and testing has been demonstrated To achieve D2 evidence of the identifying various errors and rectifying them in the program are shown, different aspects of the program are tested and demonstrated in documentation.
Tasks 3
Student Grades
Each Unit will be graded as a Pass, Merit, Distinction, Referred or Withheld
A Pass is awarded for the achievement of all Learning Outcomes against the specified Assessment Criteria.
A Merit or Distinction is awarded for higher level achievement.
If all Learning Outcomes have not been achieved the work is Referred
Where there is some doubt or concern regarding the origin of some of the content, the work is withheld. The student will then be interviewed to ascertain originality.
When a Unit has been assessed Grades are reported on the Online E - Learning System. Students can obtain the grade awarded by viewing the Submission Inbox.
Grades are reported according to the following;
50% indicates Pass
60% indicates Merit
70% indicates Distinction
30% indicates Referred
5% indicates Unreasonable Submission
0% indicates Withheld
A percentage mark within one of the boundaries indicates further work would be required to achieve the next highest grade e.g. 50% indicates that a Pass has been achieved, with additional work (according to the grade descriptors) a Merit could have been achieved.
By viewing the Report the Originality can be obtained.
Clicking on the GradeMark tab will reveal the QuickMark comments.
Clicking on the General Comment tab will reveal the comments made by the Assessor and Internal Verifier
NOTE
• The Assignment Brief details all Assessment Criterions against which the coursework will be assessed
• The Assignment Brief also specifically indicates which of the above grade descriptors have been incorporated within the activities to be assessed, in order that a student can achieve a Merit or Distinction.
• Late and Very Late Submissions of the assignments are capped to Pass only.