Docsity

Subscripted Variable - Interactive Programming - Exam, Exams of Management Information Systems

Toggle sidebar
bg1
!
Semester I Examinations 2008/ 2009
Exam Code(s)
1AE1, 1BD1, 1BD3
Exam(s)
Masters of Business Studies in Electronic Commerce
Higher Diploma in Systems Analysis full-time
Higher Diploma in Systems Analysis part-time
Module Code(s)
MS840
Module(s)
Interactive Programming 1
Paper No.
Repeat Paper
External Examiner(s)
Professor H. van der Heijden
Internal Examiner(s)
Professor J. F. Collins
Mr. Seamus Hill
Instructions:
Candidates are required to answer:
Section A (20 Marks) Answer all 10 parts of section A,
This section consists of 10 multiple-choice questions all of which
should ideally be attempted. Answers are to be written on the
MCQ sheet provided, NOT on the Examination paper.
Section B (80 Marks) Answer Any Two Questions
Duration
2 hrs
Department(s)
Accountancy & Finance
Course Co-ordinator(s)
Requirements:
Handout
MCQ
Yes, Type a-d
Statistical Tables
Graph Paper
Log Graph Paper
Other Material
!
pf3
pf4
pf5
pf8

Partial preview of the text

Download Subscripted Variable - Interactive Programming - Exam and more Exams Management Information Systems in PDF only on Docsity!

Semester I Examinations 2008/ 2009

Exam Code(s) 1AE1, 1BD1, 1BD Exam(s) Masters of Business Studies in Electronic Commerce Higher Diploma in Systems Analysis full-time Higher Diploma in Systems Analysis part-time Module Code(s) MS Module(s) Interactive Programming 1 Paper No. Repeat Paper External Examiner(s) Professor H. van der Heijden Internal Examiner(s) Professor J. F. Collins Mr. Seamus Hill Instructions: Candidates are required to answer: Section A (20 Marks) Answer all 10 parts of section A, This section consists of 10 multiple-choice questions all of which should ideally be attempted. Answers are to be written on the MCQ sheet provided, NOT on the Examination paper. Section B (80 Marks) Answer Any Two Questions Duration 2 hrs Department(s) Accountancy & Finance Course Co-ordinator(s) Requirements :

Handout

MCQ Yes, Type a-d

Statistical Tables

Graph Paper

Log Graph Paper

Other Material

Section A (20 Marks) Attempt all 10 questions Mark your answers on the MCQ sheet provided

1) An array is a set of variables. Each individual variable is called _______.

a) a subscript

b) an element

c) a subscripted variable

d) an index

2) If an exception is thrown and the message, "Index was outside the bounds of the array."

displays, this indicates _______.

a) the array is completely full of data

b) the subscript is a value greater than the number of elements declared in the

array's Dim statement

c) the subscript has reached a value lower than the number of elements

declared in the array's Dim statement

d) The answer could be B or C

3) When you are working with an array, the easiest way to traverse the elements is to use

the _______.

a) If / Then statement

b) Next statement

c) For Each / Next statement

d) Case structure

4) Given the following code, which of the choices below would be used to access the phone

number of the 3rd vendor?

Private Structure Vendor

Dim VendorIDString As String

Dim NameString As String

Dim PhoneString As String

End Structure

Dim BusinessVendor(5) As Vendor

a) BusinessVendor(2).PhoneString

b) Vendor(2).PhoneString

c) PhoneString(2).Vendor

d) BusinessVendor(2)

continued …

9) What will display in MessageLabel when the following statements are executed?

Assume that CountInteger = 10.

MessageString = "Visual Basic is fun"

IF CountInteger <= 10 Then

MessageLabel.Text = MessageString.ToLower()

ELSEIF CountInteger > 20 Then

MessageLabel.Text = MessageString.ToUpper()

ELSE

MessageLabel.Text = MessageString

END IF

a) VISUAL BASIC IS FUN

b) Visual Basic Is Fun

c) visual basic is fun

d) syntax error

10) With the logical operator _______ , both expressions must be true for the entire

expression to evaluate True.

a) And

b) Or

c) AndAlso

d) OrElse

(20 Marks)

Section B (80 Marks) Answer Any TWO Questions Question 2

Review the following application and explain the purpose of the application and how it works.

Explain, line by line, the purpose of each class and procedure. Where possible sketch the relevant

forms and outputs. Use the line numbers for reference purposes.

01 Option Strict On 02 03 Public Class MainForm 04 05 Private TotalInteger(7) As Integer 06 07 Private Sub OkButton_Click(ByVal sender As System.Object, _ 08 ByVal e As System.EventArgs) Handles OkButton.Click 09 10 Dim GroupNumberInteger As Integer 11 Dim SaleInteger As Integer 12 13 Try 14 GroupNumberInteger = Integer.Parse(GroupTextBox.Text) - 1 15 If GroupNumberInteger >= 0 And GroupNumberInteger <= 7 Then 16 SaleInteger = Integer.Parse(SaleTextBox.Text) 17 TotalInteger(GroupNumberInteger) += SaleInteger 18 Else 19 MessageBox.Show("Enter a valid group number (1-8)", _ 20 "Data Entry Error", _ 21 MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 22 End If 23 Catch 24 MessageBox.Show("Numeric entries required for both _ 25 group number and sales.", _ 26 "Data Entry Error", MessageBoxButtons.OK, _ 27 MessageBoxIcon.Exclamation) 28 End Try 29 30 With GroupTextBox 31 .Clear() 32 .Focus() 33 End With 34 SaleTextBox.Clear() 35 End Sub 36 continued …

Question 3 Part a)

In relation to VB .NET discuss with appropriate examples each of the following

terms:

i) Parameter passing By Value and By Reference

ii) Scope and lifetime of module-level, local, and static variables

(10 Marks) Part b)

Create a project that contains a list box with the name of all the counties on the island of

Ireland (see table below). When the user types in the first letters of the county into a text

box, set the SelectedIndex property of the list box to display the appropriate name.

Include an exit menu item under a File menu and a Help menu which will contain an

About item that displays an About form.

Antrim Down Leitrim Roscommon

Armagh Dublin Limerick Sligo

Carlow Fermanagh Longford Tipperary

Cavan Galway Louth Tyrone

Clare Kerry Mayo Waterford

Cork Kildare Meath Westmeath

Derry Kilkenny Monaghan Wexford

Donegal Laois Offaly Wicklow

(30 Marks)

Question 4 Part a)

Detail your understanding, using examples/analogies where appropriate, of each of

the following:

i. the Object Model (of programming),

ii. Microsoft’s Visual studio .NET

iii. the .Net framework

iv. Visual Basic.Net.

(20 Marks) Part b)

Explain exceptions, the exception class and the three key properties of the exception

class.

(15 Marks) Part c)

Explain the differences between sub procedures and function procedures.

(5 Marks)