Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

NATIONAL CERTIFICATE (VOCATIONAL)

INTRODUCTION TO SYSTEMS DEVELOPMENT


(Second paper)
NQF LEVEL 2

(10041022)

30 March 2021 (Y-paper)


13:00–17:00

This question paper consists of 15 pages.

565Q2S2130

Copyright reserved Please turn over


Downloaded from NCV Exam Papers App
(10041022) -3-

TIME: 4 HOURS
MARKS: 100

INSTRUCTIONS AND INFORMATION

1. Answer all the questions.

2. Read all the questions carefully.

3. Number the answers according to the numbering system used in this


question paper.

4. Write neatly and legibly.

INSTRUCTIONS TO CANDIDATES AND LECTURERS

1. Candidates must be seated in the computer laboratory 30 minutes before the


start of the examination to ensure that all computers have the appropriate
programs.

2. All questions must be completed on a computer using MS Office 2003 or a later


version, and VB.NET 2005, VB.NET Express, VB.NET 2008 or a later version.

3. Candidates must print the answers immediately after they have completed the
question. A candidate's EXAMINATION NUMBER must appear on all printouts
as no question without a printed EXAMINATION NUMBER will be marked.

4. In the event of problems such as a power failure, computer or a printer


breakdown the invigilator will make the necessary arrangements for the
candidate to continue with the examination process once the problem has been
resolved. Candidates will not be penalised for time lost under these
circumstances.

5. All computer work should be saved at regular intervals to prevent loss of work.
No additional time may be allowed for work lost due to lack of saving.

6. No candidate may print his/her work for another candidate, or make a memory
stick available to another candidate or access another candidate's work on the
network. Any attempt to access any information from or transfer information to
another candidate in whatever manner is a contravention of the examination
rules and regulations and will be viewed in an extremely serious light.

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -4-

7. All PRINTOUTS and SCREEN PRINTS done during the session must be
handed in.

8. Ensure that the EXAMINATION NUMBER appears on all PRINTOUTS.

9. Candidates may not copy the source code from VB.NET to MS Word to be
printed from the word processor.

10. Printing a VB.NET form or any other screen:

10.1 Run the solution.

10.2 Hold the ALT key down and press the PrintScreen button (This will
copy the active screen).

10.3 Open MS Word and paste the form/screen in a new document.

10.4 Add your EXAMINATION NUMBER to the top right-hand side of the
page.

10.5 Print the page.

11. Candidates may use the help files in VB.NET.

12. The following files will appear in the folders on the hard drive:

12.1 QUESTION 1
… \DeveloperConference

IMAGE: Developer.png

… \IMAGES

12.2 QUESTION 2
… \CalPriceIncrease

12.3 QUESTION 3
… \ComputeTestAverage

12.3 QUESTION 4
… ShoppingList

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -5-

QUESTION 1

The following questions refer to the VB.NET program Developers Conference that has
been saved on the computer.

With the evolution of 4IR a team of developers is planning a conference. You and your
team offered to design an application to help register conference attendees.

The program allows the user to enter a corporate ID, first name, last name, select a
number of days for training, select a pre-course and check the course to attend.

When the user clicks the Calculate Cost button, Cost Information is displayed in a label
at the bottom of the program.

You have to design the graphical user interface for the program.

NOTE: No code is required for this question. You are only required to create the
graphical user interface.

Use FIGURE 1 below and the instructions which follow as a guide to help you complete
the interface.

FIGURE 1

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -6-

Open the program DeveloperConference and follow the instructions below to complete
the blank interface which has been saved on the computer.

1.1 Add a PICTURE BOX to the form as part of the heading.



CONTROL NAME IMAGE
PictureBox picDeveloper Use the image saved on your
computer as 'Developer.png' (2)

1.2 Add FOUR GROUP BOXES to the form, to group the Lawyer Information,
Client Details, Case Types and Payment Information.

CONTROL NAME TEXT


Group Box grpConference Pre-Conference
Group Box grpCourses Courses (2)

1.3 Add SIX LABELS to the form, one for the Title, Corporate ID, first name, last
name, number of days, and one to display the conference costs information.

CONTROL NAME TEXT SIZE FONT

 Label lblTitle Developers


Association
Conference
22 Monotype
Corsiva

Registration
Label lbCorporateID Corporate ID: Default
Label lblFirstName First name: Default
Label lblLastName Last name: Default
Label lblNumber Number of days Default
Label lblDisplay (Blank) Border: Fixed Single
Size: See Figure 1 (9)

1.4 Add THREE TEXT BOXES to the form to enter the Corporate ID, First Name
and Last Name.

CONTROL
Text Box
Text Box
NAME
txtCorporateID
txtFirstName
(Blank)
(Blank)
TEXT

Text Box txtLastname (Blank) (3)

1.5 Add a Number Up Down to the form to select number of days.

CONTROL NAME ITEMS


npdDay Number of Days Default (1)

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -7-

1.6 Add a RADIO BUTTON to the form, to indicate whether or not the client has
legal insurance, and also to select the case type.

CONTROL NAME TEXT



Radio Button radTakePre Take Pre-Conference (1)

1.7 Add THREE COMBO BOXES to the form to choose the course.

CONTROL NAME ITEMS


Check Box chkPHP PHP Advance
Check Box chkVb VB.Net Intermediate
Check Box chkC# C# Intermediate (3)

1.8 Add THREE BUTTONS to the form, one to process the payment, one to clear
all the fields on the form, and one to exit the program.

CONTROL NAME TEXT Font Size


Button btnCalculateCosts &Calculate Costs Default
Button btnCl&ear &Clear Default
Button btnExit &Exit Default (3)

1.9 Change the text in the title of the form to your EXAMINATION NUMBER and
make a PRINTOUT of the form.
 (2)
[26]

QUESTION 2

The following questions refer to the VB.NET program called CalPriceIncrease that has
been saved on the computer.

To determine the percentage with which a store increases the price of items an
application must be designed that can be used to determine the percentage increase
per item in a store:

The program should be able to calculate and determine if there is a percentage increase
for an item:

Clicking on the Calculate Increase button should then result in the percentage rate being
displayed to the user.

Use the IPO chart below to help you with the program. 
INPUT PROCESSING OUTPUT
ItemName Calculate Percentage: ItemName
yearOnePrice PercentRate
yearTwoPrice PercentRate = (Price1 x Price2) / Price1 × 100

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -8-

FIGURE 2 below is a screen print of the user interface. The completed interface has
been saved on the computer.

Open the solution CalPriceIncrease and follow the instructions to complete the program.

FIGURE 2

The following steps explain how to use the program in order to calculate percentage
increase or decrease of an item:

STEP 1 RUN the program and enter the Item, Price1, and Price2.

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -9-

STEP 2 Clicking the Calculate button displayed as follows:


2.1 Add the following code to the Form_Load event:

2.1.1 Add suitable comments to the program. (1)

2.1.2 Add your EXAMINATION NUMBER as a comment in the source


code. (1)

2.2 Add the following program code to the click event of the Calculate button:

2.2.1 Declare ALL the required variables. (3)

2.2.2 Determine that the item text box is not empty. If it is empty display a
message box, set focus. Else assign the value from the item text box
to the appropriate variable. (3)

2.2.3 Determine if the text boxes of price1 and price 2 contain numeric
values. If nonnumeric then display a message box, set focus. Else
assign the value from the price text box to the appropriate variable. (5)

2.2.4 Calculate the percentage increase rate. (4)

2.2.5 Determine that the percentage increase rate is greater than zero and
if is greater than zero display the calculated increase percentage in
the label as shown in Step 2 above. (6)

2.2.6 Display in the label if there is no increase or decrease percentage


for the item. (2)

2.3 Clicking the Clear Button should clear the textbox and the label, as well as set
focus on Price1 text box. (3)

2.4 Clicking the Exit Button should close the program.


 (1)

Make a PRINTOUT of the source code.


[29]

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -10-

QUESTION 3

The following questions refer to the VB.NET program called ComputeTestAverage that
has been saved on the computer.

You designed an application to help candidates determine their performance early in the
year by calculating their test marks for theory and practical work to get an average mark
indicating pass or fail.

The program allows the user to enter the theory mark and practical mark as follows:

 Enters the theory mark and the practical mark:

 decAverageMark = (intTheory / 10.0 × 6) + (intPractical / 10.0 × 4)

The program determines the average and displays a message indicating either pass or
fail with the average mark.

Use the IPO chart below to help you with the program:

INPUT PROCESSING OUTPUT



TheoryMark Calculations AverageMark
PracticalMark AverageMark = (intTheory / 10.0 × 6)
+ (intPractical / 10.0 × 4)

Determine if candidate has failed/passed


AverageMark > = 50

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -11-

FIGURE 3 is a screen print of the user interface. The completed interface has been
saved on your computer. Open the solution ComputeTestAverage and follow the
instructions to complete the program.


FIGURE 3

The following steps explain how to use the program:

STEP 1 RUN the program and enter the theory mark and the practical mark.

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -12-

STEP 2 Click the Calculate Average button to calculate and display the Average mark
as below.

3.1 Add the following program code to the click event of the Calculate Average
button:

3.1.1 Declare ALL the required variables. (3)

3.1.2 Determine that the theory and practical text boxes contain numeric
values If empty, alert the user with an error message, set the focus
to the theory text box and clear values. (5)

3.1.3

Convert and assign the values from the text boxes to the appropriate
variables. (2)

3.1.4 Calculate the average mark for theory and practical. (2)

3.1.5 Determine that the Average mark is greater than or equal to 50,
using (an) <if> statement. (3)

3.1.6 Display the calculated Average mark in the label as shown in


Step 3 above. (2)

3.2 Clicking the Clear Button should display a message alerting the user about
clearing the text boxes, the display label and set focus to theory text box.

3.3

Clicking the Exit button should close the program.
(6)

(1)

Make a PRINTOUT of the source code.


[24]

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -13-

QUESTION 4

The following questions refer to the VB.NET program ShoppingList that has been saved


on the computer.

You designed an application that allows you to enter items you want to buy and their
prices until you enter X to stop the program and to calculate and display the total cost of
the items.

The program should accept the item name and price

FIGURE 4 below is a screen print of the user interface.

 FIGURE 4

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -14-

The following steps explain how to use the program:

STEP 1 RUN the program and click the Create ShoppingLlist button to enter all the
shopping list items:

STEP 2 Enter the price of the item.

STEP 3

Enter X to stop entering items and display the output of the program in the
Shopping List box.


STEP 4 The Clear button clears shopping list on the form.

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(10041022) -15-

STEP 5 When the Exit button is clicked, the following message is displayed:

Clicking the OK button closes the application, while clicking the Cancel button
leaves the program running.

The application contains numerous syntax and logical errors, and you must debug the
source code.

Below is a PRINTOUT of the program code with all the syntax and logical errors still
present.
Public Class frmShoppingList

'declare variables
DimstrItem As String
Dim decPrice As Decimal
Dim decTotalPrice As Decimal

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCreateList.Click
'create for loop to run until the user enter E for exit
lstShoppingList.Items.('ITEM NAME' & vbTab & 'PRICE:')
For = 1 To 5

strItem = InputBox('Please enter Item Name:', 'Item Name')

If (strItem = 'X') Then 'Determine that X is entered and exit the


loop
Exit

End If
'determine that the user enters a number for an item
price

If Decimal.TryParse(InputBox('Please enter Item Price', 'Item


Price'), ) Then

lstShoppingList.Items.Add(strItem & vbTab & ' ' & vbTab &


decPrice.ToString('c'))

decTotalPrice = decPrice - decTotalPrice


End If

Next

lstShoppingList.Items.Add(======================')
lstShoppingList.('TOTAL PRICE = ' & .ToString('c'))

End Sub

Copyright reserved Please turn over

Downloaded from NCV Study Guides App


Downloaded from NCV Exam Papers App
(6031002) -16-

Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnClear.Click
.Items.()

End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnExit.Click
'Exit program
userAnswer As String
userAnswer = MessageBox.Show('Are you sure you want to exit?',
'Exit', MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If userAnswer = vbNo Then
Me.Close()
End If

End Class

4.1 Open the program ShoppingList and correct all the syntax and logical errors in
the code. (18)
4.2 Add your EXAMINATION NUMBER to the source code as indicated and make
a PRINTOUT of the source code. (1)
4.3 Add you EXAMINATION NUMBER to the title bar of the form, and enter the test
data below.

Item Price 
Bread 15
Milk 22
Eggs 90

Make a PRINTOUT of the form showing the correct result. (2)


[21]
TOTAL: 100

Copyright reserved

Downloaded from NCV Study Guides App

You might also like