Docsity

Higher Certificate in Engineering Exam - Computer Applications and Programming, Exams of Computer Programming

Toggle sidebar
bg1
Cork Institute of Technology
Page 1 of 3
Higher Certificate in Engineering in Electronic Engineering – Award
(NFQ – Level 6)
Summer 2007
Computer Applications & Programming
(Time: 3 Hours)
Answer ANY five questions.
All questions carry equal marks.
Examiners: Dr. D.O’Donovan
Mr. D. Denieffe
Dr. R O Dubhghaill
1. (a) Describe the operation of the Binary Search algorithm. Use the list:
1 4 9 45 78 90 345 765
to illustrate how the value 4 is located using the Binary search algorithm. [8 %]
(b) Write code to implement the Binary Search algorithm in BASIC. [12 %]
2. (a) Compare & Contrast the Select Sort and Bubble Sort Algorithms. [6 %]
(b) Write a program that sorts an array of 50 integers using the Select Sort Algorithm. [10 %]
(c) Describe how arrays may be dynamically resized in Visual Basic. How are contents of the
array maintained? [4 %]
3. (a) State and describe the important properties of three of the following Visual Basic controls:
• Text box
• List box
• Check box
• Timer [6 %]
pf3

Partial preview of the text

Download Higher Certificate in Engineering Exam - Computer Applications and Programming and more Exams Computer Programming in PDF only on Docsity!

Cork Institute of Technology

Higher Certificate in Engineering in Electronic Engineering – Award

(NFQ – Level 6)

Summer 2007

Computer Applications & Programming

(Time: 3 Hours)

Answer ANY five questions. All questions carry equal marks.

Examiners: Dr. D.O’Donovan Mr. D. Denieffe Dr. R O Dubhghaill

  1. (a) Describe the operation of the Binary Search algorithm. Use the list:

1 4 9 45 78 90 345 765 to illustrate how the value 4 is located using the Binary search algorithm. [8 %]

(b) Write code to implement the Binary Search algorithm in BASIC. [12 %]

  1. (a) Compare & Contrast the Select Sort and Bubble Sort Algorithms. [6 %]

(b) Write a program that sorts an array of 50 integers using the Select Sort Algorithm. [10 %]

(c) Describe how arrays may be dynamically resized in Visual Basic. How are contents of the array maintained? [4 %]

  1. (a) State and describe the important properties of three of the following Visual Basic controls:
    • Text box
    • List box
    • Check box
    • Timer [6 %]

(b) Write a program in Visual Basic to accept 10 numbers from the keyboard using a text box called “InputText”. A command button called “AddButton” should be used to add the value currently in the text box “InputText” to a list box called “UnsortedList”. Another command button “DisplayList” should be used to activate/deactivate a timer called “TimerDisplay” to display each value in the list box “UnsortedList” at 0.5 seconds intervals in a label called “DisplayLabel”. See Figure 3.1 [14 %]

Figure 3.

  1. (a) Describe what is meant by:

o Hardware address [2 %] o IP address [2 %] o Internet address [2 %] o Client/Server architecture [2 %]

(b) Compare RISC and CISC architectures. [12 %]