




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Modeless Method, Listcount Property, Array are Accessed, Many Elements, Individual Variables, Items Collection, Alphabetical Order, the Original Value, Passing Arguments, Performs Actions are some keywords of exam paper of Business Applications Programming.
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Section A (20 Marks) Attempt all 10 questions Mark your answers on the MCQ sheet provided
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 the purpose of each class and procedure. Where possible sketch the relevant forms and outputs. It is not necessary to give a line by line explanation however; an adequate explanation of each block of code (its purpose and how it works) is required. If code is repeated, do not repeat yourself; refer to your previous explanation and highlight any difference. Use the line numbers for reference purposes. 01 Option Strict On 02 03 Public Class mainForm 04 05 Private Sub NewTesterToolStripMenuItem_Click(ByVal sender As 06 System.Object, ByVal e As System.EventArgs) Handles 07 NewTesterToolStripMenuItem.Click 08 newTesterForm.ShowDialog() 09 End Sub 10 11 Private Sub SummaryToolStripMenuItem_Click(ByVal sender As 12 System.Object, ByVal e As System.EventArgs) Handles 13 SummaryToolStripMenuItem.Click 14 15 If newTesterForm.totalTestersInteger > 0 Then 16 summaryForm.ShowDialog() 17 Else 18 MessageBox.Show("No data to summarize", "Reviewers 19 Needed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 20 End If 21 End Sub 22 23 Private Sub ExitToolStripMenuItem_Click(ByVal sender As 24 System.Object, ByVal e As System.EventArgs) Handles 25 ExitToolStripMenuItem.Click 26 27 Me.Close() 28 End Sub 29 30 Private Sub AboutToolStripMenuItem_Click(ByVal sender As 31 System.Object, ByVal e As System.EventArgs) Handles 32 AboutToolStripMenuItem.Click 33 34 AboutBox1.ShowDialog() 35 End Sub 36 37 Private Sub mainForm_Load(ByVal sender As System.Object, ByVal 38 e As System.EventArgs) Handles MyBase.Load 39 40 End Sub 41 End Class 42
43 Public Class newTesterForm 44 Friend totalBoratInteger, totalStardustInteger, 45 totalTestersInteger As Integer 46 47 Private Sub closeButton_Click(ByVal sender As System.Object,_ 48 ByVal e As System.EventArgs) Handles closeButton.Click 49 50 51 Me.Hide() 52 End Sub 53 54 Private Sub okButton_Click(ByVal sender As System.Object,_ 55 ByVal e As System.EventArgs) Handles okButton.Click 56 57 58 Dim boratInteger, stardustInteger As Integer 59 60 Try 61 boratInteger = Integer.Parse(boratTextBox.Text) 62 If boratInteger < 0 Or boratInteger > 10 Then 63 MessageBox.Show("Enter score for Borat from 1 to_ 64 10", "Invalid score") 65 With boratTextBox 66 .SelectAll() 67 .Focus() 68 End With 69 Else 70 Try 71 stardustInteger = 72 Integer.Parse(stardustTextBox.Text) 73 If stardustInteger < 0 Or stardustInteger > 10_ 74 Then 75 MessageBox.Show("Enter score for Stardust_ 76 from 1 to 10", "Invalid score") 77 With stardustTextBox 78 .SelectAll() 79 .Focus() 80 End With 81 82 Else 83 totalBoratInteger += boratInteger 84 totalStardustInteger += stardustInteger 85 totalTestersInteger += 1 86 87 stardustTextBox.Clear() 88 With boratTextBox 89 .Clear() 90 .Focus() 91 End With 92 End If 93 94 Catch stardustException As FormatException 95 MessageBox.Show("Please input a number between_ 96 1 and 10.", "Rate Stardust", MessageBoxButtons.OK, 97 MessageBoxIcon.Exclamation) 98 stardustTextBox.Focus() 99 End Try 100 End If
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 to keep track of concert ticket sales by your club. Tickets prices are based on the seating location. Your program should calculate the price for each sale, accumulate the total number of tickets sold in each section and display the price schedule (see below). The form should contain a list box of the sections for seating. Do not allow the user to receive an exception for subscript out-of-range. (30 Marks)
Question 4 Part a) Detail your understanding, using examples/analogies where appropriate, of each of the following: i. Static Variables ii. The Case Structure iii. Try/Catch blocks iv. Access Keys (20 Marks) Part b) Explain, using a VB.NET example, the concept of Method Overloading. (15 Marks) Part c) Explain the differences between sub procedures and function procedures. (5 Marks)