Software Development 0809
National College of Ireland Higher Certificate in Science in Computing (Applications & Support) Year 1 (HCC1) Semester Two Examinations – 2006/2007 Friday 27th April 2007 4.00pm – 6.00pm ______________________________________________________________________ Software Development II Mr. Jim O Dwyer Ms. Orla Lahart Answer Section A and One Question form Section B Duration of exam: 2 hours Attachments: Page 1 of 6 National College of IrelandSection A (60 marks) Question 1 a) Define the purpose of the StringBuffer class in Java. State two methods of the StringBuffer class. b) Write a code segment that accepts a String from the user and displays the first and last characters in the String. c) Define the term array. Give an example where one might be used. Declare and create an array of ten doubles. Initialise all elements of the array to 0. d) Use a loop to display ten times tables as illustrated below. 10 * 0 = 0 10 * 1 = 10 10 * 2 = 20 10 * 3 = 30 . . . 10 * 12 = 120 e) Appendix A contains a number of patterns which of the patterns would be displayed when the following code is executed. int arr[]; arr = new int[10]; int i; for(i=0; i
Presentation Transcript
Your Facebook Friends on WizIQ