Вы находитесь на странице: 1из 14

BSc (Hons) Computer Science with

Network Security
Cohort: BCNS/16A/FT

Examinations for 2017 / Semester 1


Resit Examinations for BCNS/15B/FT, BIS/14B/FT &
BCNS/14B/FT

MODULE : Visual Programming

MODULE CODE: PROG 2104C

Duration : 3 Hours

Instructions to Candidates:

1. This question paper consists of two sections: Section A and Section B.


2. Section A is compulsory.
3. Answer any two questions from Section B.
4. Questions may be answered in any order but should be clearly marked
5. Start each question on a new page
6. Total marks 100.

This Question Paper contains 4 questions and 14 pages.


Page 1 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
SECTION A (Compulsory)

QUESTION 1: (40 MARKS)


a) The Norman’s design guideline applied to user interface design of computer
applications consist of six principles. With the help of examples, and using
diagrams where necessary, write short notes on any two Norman’s design
principles.
(12 Marks)
b) Identify five ways to improve on the following.

Query

List of Member
Book List
Member List by Registration date
Book List by Author
Payment Date
Payment Supplier

Fig 1 (b)

(5 marks)

c) In HCI there are several considerations when designing and using input
devices. One of them is “Ergonomics”. Briefly describe what this term means
with the help of appropriate examples.
(3 marks)

d) With the help of an appropriate diagram, briefly explain the following four
Menu types below:
Menu bar
Cascading Menu
Pull Down Menu
Pop up Menu
(5 marks)

Page 2 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
e) A light pen is special type of screen pen which is used as input device in
some application areas. List three task for which a Light Pen is appropriate.
(3 marks)

f) The .Net Framework consists of three main components. Name and briefly
describe these three components supporting your answer with an appropriate
diagram.
(9 + 3 marks)

SECTION B
(Answer any two questions)

QUESTION 2: (30 MARKS)

a) You are provided with the following screenshot of a media player application with
a progress bar control at the bottom as shown in Fig 2 a) (i) and 2 a) (ii) . When
the Start button is clicked the Progress bar starts, the Play button of the player
becomes visible.

(i) What is the purpose of the progress bar control? What are three important
parameters of the Progress Bar control?
(4 marks)

(ii) Explain fully with the necessary VB.Net codes how you would implement the
progress bar as shown in Fig 2 a) below when the Start Button is clicked.
(6 marks)

Page 3 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 2 a) (i)

Fig 2 a) (ii)

b) A bank has 4 types of accounts with annual interests rates as follows:

1. Savings 8%

2. Savings with cheque book 5%

3. Current 4%

4. Fixed deposits 10%

Page 4 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Write a VB.net program that allows the input of the current balance in textbox,
txtBalance and input type of account in textbox, txtAccount and displays the
total interest obtainable in label lblOutput, when the button, btnCalculate is
clicked.

You have to make use of the Select Case statement. Ensure that the
following validations occur:

I. The textboxes should not be left empty. (2 marks)

II. Balance should be numeric and positive. (2 marks)

III. Account type should be in the appropriate range. (2 marks) + 2 marks for
correct syntax + 2 marks for logic
Provide appropriate error messages if the above conditions are not met.
(Total marks: 10 marks)

Fig 2 b) (i)
Page 5 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 2 b) (ii)

Fig 2 b) (iii)

Fig 2 b) (iv)
Page 6 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
(c) This part of the question covers ‘Status Bar’.

(i) What is the purpose of the control ‘Status Bar’?


(2 marks)
(ii) Write VB.Net codes to display the information (Today’s date, the text” The
data in panel must be updated”, actual time) in the three panels of the status
bar as shown below in Fig 2(c) (i).
(5 marks)
(iii) List the essential steps to create the three panels in the Status bar.

(3 marks)

Fig 2 (c) (i)

(Total 10 marks for part (c))

Page 7 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Question 3 (30 Marks)
Fig 3 shows some screenshots of a small application to display the details of some
parts of a computer. It consists of the ID (integer), Part (String), Type (String), Price
(Double) and the available quantity (int). All the details are stored in an MS Access
database named ‘pcParts.mdb’. Once the ‘Display in textboxes button is pressed,
the first record is displayed along with its calculated total price (NB: Total price =
price * quantity). Navigation buttons are also provided to browse through the different
records.
To display all records at one go in the datagrid (dgView1) in Form 2, the‘Display
data in Grid’ Button is pressed.

(a) Write VB.Net codes to connect to the database, test for its connection and
display the data in the text boxes. (12 marks)

(b) Write VB.Net codes to display the records in the data grid as shown in Fig 3(b).
What changes need to be brought about with the global variables in Form 1 to be
able to display the data in the data grid in Form 2?
(8 + 2 marks)
(c) Write VB.Net codes to implement the ‘Previous’ and the ‘Last’ buttons as shown
in Fig 3 (a).
(5 + 3 marks)

Page 8 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 3 (a) (i)

Fig 3 (a) (ii)

Page 9 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 3 (a) (iii)

Fig 3 (a) (iv)

Page 10 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 3 (a) (v)

Fig 3 (b) (i)

Page 11 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 3 (b) (ii)

Question 4 (30 Marks)

a) Fig 4 shows some screenshots of a small application to display the details of some
parts of a computer. It consists of the ID (integer), Part (String), Type (String), Price
(Double) and the available quantity (int). All the details are stored in an external plain
text file (Notepad File) named ‘pcParts.txt’. Once the ‘Display record in Listbox’
Button is pressed the different records are displayed in the first listbox
(lstParts).Once the ‘Classify by type’ button is pressed, the software records are
placed in the lstSoftware listbox and the hardware records are placed in the
lstHardware listbox respectively. At the same time these records are also written to
two external textfiles, namely Software.txt and Hardware.txt respectively as shown
below.

Page 12 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Write VB.Net codes for these buttons:
(i) ‘Display Records in Listbox’. (14 marks)
(ii) ‘Classify by Type’ (16 marks)

Fig 4.1

Page 13 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1
Fig 4.2

Fig 4.3

***END OF QUESTION PAPER***

Page 14 of 14
Visual Programming (PROG2104C) SITE/June 2017 Sem 1

Вам также может понравиться