





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Exam Code(s) 1AE1, 1 MIS 1 , 1 MIS Exam(s) (^) Masters of Business Studies in Electronic Commerce MSc. Information Systems Management full-time MSc. Information Systems Management part-time
Module Code(s) (^) MS8 06 Module(s) Business Applications Programming
Paper No. Repeat Paper
External Examiner(s) Professor H. van der Heijden Internal Examiner(s) Dr. T. Acton 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 3 hrs
Department(s) (^) Accountancy & Finance Course Co-ordinator(s)
Requirements : MCQ Yes, Type a-d
Section B (80 Marks) Answer Any TWO Questions
Question 2
1 Option Strict On 2 3 Public Class pieceworkForm 4 5 Friend workerCountInteger, totalPiecesInteger As Integer 6 Friend totalPayDecimal As Decimal 7 Const RATE1_TO_199_Decimal As Decimal = 0.5D 8 Const RATE200_TO_399_Decimal As Decimal = 0.55D 9 Const RATE400_TO_599_Decimal As Decimal = 0.6D 10 Const RATE600_PLUS_Decimal As Decimal = 0.65D 11 12 Private Function AmountEarned(ByVal quantityInteger As Integer) As Decimal 13 14 Dim payRateDecimal As Decimal 15 16 Select Case quantityInteger 17 Case 1 To 199 18 payRateDecimal = RATE1_TO_199_Decimal 19 Return quantityInteger * payRateDecimal 20 Case 200 To 399 21 payRateDecimal = RATE200_TO_399_Decimal 22 Return quantityInteger * payRateDecimal 23 Case 400 To 599 24 payRateDecimal = RATE400_TO_599_Decimal 25 Return quantityInteger * payRateDecimal 26 Case Is > 599 27 payRateDecimal = RATE600_PLUS_Decimal 28 Return quantityInteger * payRateDecimal 29 End Select 30 End Function 31 32 Private Sub CalculatePayToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculatePayToolStripMenuItem.Click 33 34 Dim messageString As String 35 Dim quantityInteger As Integer 36 Dim amountEarnedDecimal As Decimal 37 38 With Me 39 If .nameTextBox.Text <> "" Then 40 Try 41 42 quantityInteger = Integer.Parse(.quantityTextBox.Text) 43 44 If quantityInteger > 0 Then
46 amountEarnedDecimal = AmountEarned(quantityInteger) 47 totalPayDecimal += amountEarnedDecimal 48 totalPiecesInteger += quantityInteger 49 workerCountInteger += 1 50 51 .amountEarnedTextBox.Text = amountEarnedDecimal.ToString("C") 52 Else 53 messageString = "Please enter a number greater than zero." 54 MessageBox.Show(messageString, "Data Entry Error", _ 55 MessageBoxButtons.OK, MessageBoxIcon.Information) 56 With quantityTextBox 57 .Focus() 58 .SelectAll() 59 End With 60 End If 61 Catch quantityException As FormatException 62 MessageBox.Show("Enter the quantity.", "Data entry error", _ 63 MessageBoxButtons.OK, MessageBoxIcon.Information) 64 With .quantityTextBox 65 .Focus() 66 .SelectAll() 67 End With 68 End Try 69 Else 70 messageString = "Please enter worker name." 71 MessageBox.Show(messageString, "Missing Data", _ 72 MessageBoxButtons.OK, MessageBoxIcon.Information) 73 .nameTextBox.Focus() 74 End If 75 End With 76 End Sub 77 78 Private Sub SummaryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SummaryToolStripMenuItem.Click 79 80 Dim messageString As String 81 82 If workerCountInteger > 0 Then 83 summaryForm.ShowDialog() 84 Else 85 messageString = "No data to summarize." 86 MessageBox.Show(messageString, "Piecework Pay", MessageBoxButtons.OK, _ 87 MessageBoxIcon.Information) 88 End If 89 End Sub 90 91 Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click 92 93 Me.Close()
145 Else 146 .LogoToolStripMenuItem.Checked = True 147 .logoPictureBox.Visible = True 148 End If 149 End With 150 End Sub 151 End Class 152 Option Strict On 153 154 Public Class summaryForm 155 156 Private Sub summaryForm_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated 157 158 With Me 159 Try 160 If pieceworkForm.workerCountInteger > 0 Then 161 .piecesTextBox.Text = pieceworkForm.totalPiecesInteger.ToString 162 .payTextBox.Text = pieceworkForm.totalPayDecimal.ToString("C") 163 .averageTextBox.Text = (pieceworkForm.totalPayDecimal / pieceworkForm.workerCountInteger).ToString("C") 164 .numberWorkersTextBox.Text = pieceworkForm.workerCountInteger.ToString 165 End If 166 Catch anyException As Exception 167 MessageBox.Show("Error: " & anyException.Message, "Error") 168 End Try 169 End With 170 End Sub 171 172 Private Sub okButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles okButton.Click 173 174 Me.Hide() 175 End Sub 176 End Class 177
(40 Marks)
Question 3
Part a)
(10 Marks)
Part b)
(30 Marks)