Programming Concepts Assignment - St. Patrick's College (PRC)
VerifiedAdded on 2019/09/16
|8
|2233
|58
Homework Assignment
AI Summary
This document presents a comprehensive solution to a Programming Concepts assignment, focusing on Java programming. It covers fundamental concepts such as data types (variables, constants), input/output operations, and operators. The assignment delves into control structures, including selection (if and switch statements) and iteration (for, while, and do-while loops), demonstrating their application in various programming scenarios. It further explores modularization using functions and procedures, emphasizing the scope and lifetime of variables and data passing between modules. The assignment also encompasses the use of arrays, program documentation (user and program documentation), and testing methodologies, including error detection (semantic and syntax errors), test plan creation, and the application of test data to identify logic errors. The solution includes Java code examples and explanations for each task, addressing the assessment criteria related to designing and developing code, using modularization, producing documentation, and applying test schedules.

Unit: Programming Concepts
Unit Level: H1
Unit Code: PRC
Student Name: Date of Issue: 01 June 2016
Student ID: Date of Submission: 18 August 2016
Coursework Regulations
1 All coursework must be submitted via www.stpmoodle.net
2 Please check the submission date and time and ensure that coursework is submitted on time.
3 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.
4 General guidelines for submission of coursework:
a) All work must be word-processed and must be of a “good” standard.
b) 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.
c) 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.
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 occurred will be
dealt with according to the procedures set down by the College. Please see your
Student Handbook for further details of what is / isn’t plagiarism.
Assignment Brief
Unit Level: H1
Unit Code: PRC
Student Name: Date of Issue: 01 June 2016
Student ID: Date of Submission: 18 August 2016
Coursework Regulations
1 All coursework must be submitted via www.stpmoodle.net
2 Please check the submission date and time and ensure that coursework is submitted on time.
3 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.
4 General guidelines for submission of coursework:
a) All work must be word-processed and must be of a “good” standard.
b) 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.
c) 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.
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 occurred will be
dealt with according to the procedures set down by the College. Please see your
Student Handbook for further details of what is / isn’t plagiarism.
Assignment Brief
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

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 June 2016 18 August 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 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
Qualification Unit number and Title
Pearson BTEC HND Diploma Programming Concepts (PRC)
Student name Assessor name
Date issued Completion date Submitted on
01 June 2016 18 August 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 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
I certify that the work submitted for this assignment is my own and research sources are fully acknowledged.
Student signature: Date:
Assignment Tasks
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

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
a) Identify and select appropriate pre-defined data types (1.1)
b) Use simple input/output and appropriate operators with the above (1.2)
Questions:
Give BRIEF answers to the following:
1. Define the following programming terms: variable, constant, data type.
2. How is a String variable different from char variable?
3. What is the difference between short int and long int data types?
4. Describe the process of declaring a variable. How is it done and what happens when declaration
code is executed?
Write the following Programs:
5. 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.
6. 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.
7. 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
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
a) Identify and select appropriate pre-defined data types (1.1)
b) Use simple input/output and appropriate operators with the above (1.2)
Questions:
Give BRIEF answers to the following:
1. Define the following programming terms: variable, constant, data type.
2. How is a String variable different from char variable?
3. What is the difference between short int and long int data types?
4. Describe the process of declaring a variable. How is it done and what happens when declaration
code is executed?
Write the following Programs:
5. 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.
6. 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.
7. 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
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

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
a) Identify and use appropriate selection structures and loop structures for the given task (1.3)
b) Produce programs to desired standards (1.4)
c) Demonstrate the effect of scope and life-time of variables (2.2)
d) Pass data effectively between modules (2.3)
Questions:
Give BRIEF answers to the following:
1. Describe if and switch statements, highlight their differences and provide examples.
2. How does a for loop work?
3. How does a while and a do while loop work?
4. Explain the difference between while and do-while loop structures?
Write the following Programs:
5. To prompt a user to enter three numbers, then return the largest of three numbers.
6. To prompt a user to input a number between 1 and 7 then state what day of the week it
corresponds to. You should use a switch statement to accomplish this.
7. Modify the programs you created for questions 5 and 6 to allow the user to enter multiple values.
After the program has run the user should be given the choice of entering more data to be
processed or to exit the program.
Task 3 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
a) Identify and use appropriate selection structures and loop structures for the given task (1.3)
b) Produce programs to desired standards (1.4)
c) Demonstrate the effect of scope and life-time of variables (2.2)
d) Pass data effectively between modules (2.3)
Questions:
Give BRIEF answers to the following:
1. Describe if and switch statements, highlight their differences and provide examples.
2. How does a for loop work?
3. How does a while and a do while loop work?
4. Explain the difference between while and do-while loop structures?
Write the following Programs:
5. To prompt a user to enter three numbers, then return the largest of three numbers.
6. To prompt a user to input a number between 1 and 7 then state what day of the week it
corresponds to. You should use a switch statement to accomplish this.
7. Modify the programs you created for questions 5 and 6 to allow the user to enter multiple values.
After the program has run the user should be given the choice of entering more data to be
processed or to exit the program.
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
a) Construct a program from a design and use appropriate functions/procedures (2.1)
b) Produce user documentation for a completed programming application including the user
interface design. (3.1)
c) Develop documentation for a pre-described program application (3.2)
d) Demonstrate discrimination between semantic and syntax errors (4.1)
e) Produce test documentation. (4.2)
f) Successfully construct and use test data and schedules to detect logic errors. (4.3)
g) Use appropriate techniques for detecting errors. (4.4)
Questions:
Give BRIEF answers to the following:
1. Describe arrays and 2 dimensional arrays.
2. What is the difference between semantic and syntax errors? Provide examples.
3. 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.
4. Examine the following code and provide program documentation to accompany it:
Write the following Programs:
5. Write a program to simulate flipping a coin until one thousand heads and one thousand tails are
flipped then print out how many times tails came up, how many times heads came up and how
many times in total the coin was flipped. (Hint: you will need to use Math.random() function)
6. Write Pseudo code to describe the algorithm to be used and create a program 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.
7. Provide user documentation for the program created for question 6.
public static void main(String[] args){
boolean prime;
for(int i = 2; i <= 100; i++){
prime = true;
for(int j = i-1; j > 1; j--){
if(i % j == 0){
prime = false;
break;
}
}
if(prime)
System.out.print(i + " ");
}
}
3
Aim of the Task
This task will assess your understand of using Arrays, testing and program documentation.
Learning Outcome(s) of the Task
a) Construct a program from a design and use appropriate functions/procedures (2.1)
b) Produce user documentation for a completed programming application including the user
interface design. (3.1)
c) Develop documentation for a pre-described program application (3.2)
d) Demonstrate discrimination between semantic and syntax errors (4.1)
e) Produce test documentation. (4.2)
f) Successfully construct and use test data and schedules to detect logic errors. (4.3)
g) Use appropriate techniques for detecting errors. (4.4)
Questions:
Give BRIEF answers to the following:
1. Describe arrays and 2 dimensional arrays.
2. What is the difference between semantic and syntax errors? Provide examples.
3. 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.
4. Examine the following code and provide program documentation to accompany it:
Write the following Programs:
5. Write a program to simulate flipping a coin until one thousand heads and one thousand tails are
flipped then print out how many times tails came up, how many times heads came up and how
many times in total the coin was flipped. (Hint: you will need to use Math.random() function)
6. Write Pseudo code to describe the algorithm to be used and create a program 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.
7. Provide user documentation for the program created for question 6.
public static void main(String[] args){
boolean prime;
for(int i = 2; i <= 100; i++){
prime = true;
for(int j = i-1; j > 1; j--){
if(i % j == 0){
prime = false;
break;
}
}
if(prime)
System.out.print(i + " ");
}
}
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

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
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
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

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.
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.
1 out of 8
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.