Docsity

Engineering Exam: Higher Cert in Electronic Eng - Comp Apps & Programming, Exams of Computer Programming

Toggle sidebar
bg1
Cork Institute of Technology
Page 1 of 4
Higher Certificate in Engineering in Electronic Engineering – Award
(NFQ Level 7)
Autumn 2007
Computer Applications & Programming
(Time: 3 Hours)
Answer ANY five questions.
All questions carry equal marks.
Examiners: Mr. D. O’Donovan
Mr. D. Denieffe
Dr. R. O’Dubhghaill
1. (a) Describe the operation of the Bubble Sort algorithm. Use the list:
58, 35, 89, 23, 45, 11
To illustrate the results after one pass of a Bubble sort in ascending order. [8 %]
(b) Write code to implement the Bubble sort algorithm in BASIC. [12 %]
2. A simple employee database is stored on disk at the location “c:\employee.dat”. The data is
organised in the following format:
• first name : string
• last name : string
• salary : float
The file will hold a maximum of 100 employee entries.
(a) Define a user-defined data type to hold one entry of a first and last name and one salary.
Using this data type, define an array capable of holding the full contents of the file. [4 %]
(b) Write a function/subroutine to read the file contents into this array. [8 %]
(c) Write a function which accepts a first name, last name and employees array as parameters
and returns/gives back the corresponding salary. [8 %]
pf3
pf4

Partial preview of the text

Download Engineering Exam: Higher Cert in Electronic Eng - Comp Apps & 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 7)

Autumn 2007

Computer Applications & Programming

(Time: 3 Hours)

Answer ANY five questions. All questions carry equal marks.

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

  1. (a) Describe the operation of the Bubble Sort algorithm. Use the list:

58, 35, 89, 23, 45, 11 To illustrate the results after one pass of a Bubble sort in ascending order. [8 %]

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

  1. A simple employee database is stored on disk at the location “c:\employee.dat”. The data is organised in the following format: - first name : string - last name : string - salary : float The file will hold a maximum of 100 employee entries. (a) Define a user-defined data type to hold one entry of a first and last name and one salary. Using this data type, define an array capable of holding the full contents of the file. [4 %]

(b) Write a function/subroutine to read the file contents into this array. [8 %]

(c) Write a function which accepts a first name, last name and employees array as parameters and returns/gives back the corresponding salary. [8 %]

  1. (a) Explain each of the following terms as they apply in VB:

Control Properties Program Debugging Menu Editor BreakPoint Local and global variables [10 %]

Figure 3. (b) Write the code in the (command1_click) procedure for the command1 button shown in the VB program in Figure 3.1. This button reads the contents of a text box (text1) and adds it to the listbox (list1). [3 %]

(c) Write the code that needs to be added to the (command1_click) procedure that displays the current total of entries in the listbox (list1) in a label (label1). [3 %]

(d) Add code to the (list1_click) procedure to display the entry selected (or clicked on) by the user in a label (label2). [4 %]

  1. (a) State what you know about each of the following:
    • Plug and play
    • (^) Front Side bus
    • Pipelining
    • Cache memory
    • Branch prediction (in processors) [15 %]

(b) Discuss the concepts behind RAID technology. In your answer refer to mirroring and striping. [5 %]

  1. (a) In the context of networking, discuss the following terms:
    • Protocol
    • WAN & LAN
    • Peer to Peer Architecture
    • TCP/IP
    • IP address [10 %]

(b) In the context of making a connection to the Internet, where might the following technologies be employed?

  • Satellite
  • Wireless
  • DSL
  • Fibre-Optics [10 %]