Skip to document

Programming 2A Exam

programming
Course

Programming

119 Documents
Students shared 119 documents in this course
University

Damelin

Academic year: 2019/2020
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Damelin

Comments

Please sign in or register to post comments.

Preview text

TITLE HET: DIPLOMA: INFORMATION TECHNOLOGY

SUBJECT PROGRAMMING 2A

SUBJECT CODE PRG

TEST/EXAM EXAMINATION

SEMESTER 1 ST

DATE WRITTEN 20 JUNE 2016

TOTAL MARKS 120

DURATION 2 HOURS

PASS MARK 50%

WEIGHTING 50%

EXAMINER MR L GWALA

MODERATOR MR S NGUBENI

REQUIREMENTS:

Learner Requirements: Stationery and Examination Book Equipment Requirements: None

This paper consists of:

  1. Section A : 20 marks
  2. Section B : 30 marks
  3. Section C : 70 marks

Please answer ALL questions.

PLEASE READ THE ASSESSMENT RULES AND REGULATIONS THAT FOLLOW

Learners are warned that contravening any of the examination rules or disobeying the instructions of an invigilator could result in the examination being declared invalid. Disciplinary measures will be taken which may result in the students’ expulsion from Damelin.

ASSESSMENT RULES AND REGULATIONS

Please ensure that you have read and fully understand the following assessment rules and regulations prior to commencing with your assessment:

  1. To be permitted access to the examination, a learner must arrive with:
  • an Identity Document or other official proof of identity (for example,
  • a student card, passport or driver's licence card with photo); and
  • the required exam stationery_._
  1. No learner may enter the examination room more than 30 minutes after the examination sitting has commenced and no candidate may leave the room less than one hour after the examination sitting has commenced.

  2. No extra time will be allowed should a student arrive late.

  3. All learners must sign the Attendance Register for the examination on arrival.

  4. It is the responsibility of learners to familiarise themselves with the examination rules prior to sitting for the examination.

  5. All examinations are to be written on the date and time officially stipulated by the College.

  6. It is the responsibility of learners to ensure that they are writing the correct paper and that the question paper is complete

  7. Cell phones must be switched off prior to entering the exam venue. Cell phones and wallets may be placed under candidates' chairs rather than at the front of the room.

  8. Learners may not handle cell phones or wallets during the exam.

  9. No weapon of any description may be taken into the assessment room.

  10. All personal belongings are to be placed at the front of the examination room. Personal belongings brought to the examination are at the owner's risk.

  11. Smoking is not permitted and learners will not be allowed to leave the examination room in order to smoke

  12. Once the examination has commenced, all conversation of any form between candidates must cease until after candidates have left the room, after the examination.

  13. Only the official College examination book, as supplied by the College, may be used.

  14. Learners must ensure that their student number is written on the answer book.

  15. Learners are responsible for ensuring that they follow the instructions in the examination for submitting their answers.

  16. Please read the instruction appearing on the examination paper carefully

  17. The number of every question must be clearly indicated at the top of every answer.

  18. No pages may be torn out of the answer book. All question papers and scrap paper must be handed to the invigilator after the examination.

  19. Learners finishing earlier are to leave the examination room as quietly as possible on the instruction of the invigilator, and may not talk until outside the building where the examination is being written.

  20. Only under exceptional circumstances will a learner be permitted to leave the examination room during the examination, and if the invigilator gives permission. An invigilator must accompany the learner. Only one learner at a time may be absent from the examination room.

  21. Candidates may not act dishonestly in any respect.

SECTION A [20 Marks]

Question 1 (10)

Multiple Choice Questions

1 What is correct syntax for main method of a java class?

e) Int

f) Double

g) Boolean

h) String

1 If you want your conditional to depend on two conditions BOTH being true, what is the proper

notation to put between the two Boolean statements?

a) &

b) &&

c)!

d) ||

1 What is the result of this mathematical calculation: int num = 6%4;

a) num = 1.

b) num = 1

c) num = 2

d) num = 0

QUESTION 2 (10 Marks)

Column A Column B

2 Is the process of joining a variable to a string a longer string A. NOT operator

2 The error returned whenever an array is accessed using a subscript either below 0 or above the largest subscript

B. Ternary operator

2 A class or an object that is <Wrapped around= a simpler element C. Concatenation

2 The process of ensuring that a value falls within a specified range D. Out of bounds

2 A block with no statement in it E. Wrapper

2 Evaluates a variable and then adds 1 to it F. Reminder and assign operator (%=)

2 The first input statements prior to a loop that will execute subsequent input statement for the same variables.

G. Validating data

2 Alters the value of the operand on the left by assigning the remainder

when the left operand is divided by the right operand

H. Postfix ++

2 An operator that needs three operands I. Priming read

2 Negates the results of any Boolean expression. Written as an exclamation point (!)

J. Empty body

SECTION B (Theory) [30 Marks]

QUESTION 3 (30 Marks)

3 Define the following Java program construct: (10)

a) Public Class

b) Public Static Void Main

c) System.out()

d) Syntax Error

e) Debugging

3 Write syntax of a java snippet showing user input for a value of a String variable firstname (5)

3 Write syntax of an Switch statement showing multiple conditions, just write the syntax structure (5)

3 Write a While.. that displays a message <Welcome to Java= while the variable ( num1<3) (5)

3 Determine the output of the following for... Write the output only (5)

Int num1;

For(num1=-10; num<10;)

{

System.out(num1);

Num1+=3;

}

SECTION C (Practical) [70 Marks]

QUESTION 4 (10 Marks)

Was this document helpful?

Programming 2A Exam

Course: Programming

119 Documents
Students shared 119 documents in this course

University: Damelin

Was this document helpful?
Damelin PRG210 1
TITLE
HET: DIPLOMA: INFORMATION TECHNOLOGY
SUBJECT
PROGRAMMING 2A
SUBJECT CODE
PRG210
TEST/EXAM
EXAMINATION
SEMESTER
1ST
DATE WRITTEN
20 JUNE 2016
TOTAL MARKS
120
DURATION
2 HOURS
PASS MARK
50%
WEIGHTING
50%
EXAMINER
MR L GWALA
MODERATOR
MR S NGUBENI
REQUIREMENTS:
Learner Requirements: Stationery and Examination Book
Equipment Requirements: None
This paper consists of:
1. Section A : 20 marks
2. Section B : 30 marks
3. Section C : 70 marks
Please answer ALL questions.
PLEASE READ THE ASSESSMENT RULES AND REGULATIONS THAT FOLLOW
Learners are warned that contravening any of the examination rules or disobeying the instructions of
an invigilator could result in the examination being declared invalid. Disciplinary measures will be
taken which may result in the students’ expulsion from Damelin.
ASSESSMENT RULES AND REGULATIONS
Please ensure that you have read and fully understand the following assessment rules and regulations
prior to commencing with your assessment: