Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Total Integer - Management Information Systems - Exam, Exams of Management Information Systems

Total Integer, Displaybutton, Totalinteger, Integer Variable, Decimal Variable, Sum Values, Individual Components, Averagedecimal, Messagestring, Visual Basic are some points from questions of exam paper of Management Information Systems.

Typology: Exams

2011/2012

Uploaded on 11/26/2012

deveedaas
deveedaas 🇮🇳

4.1

(8)

83 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Ollscoil na hÉireann, Gaillimh
National University of Ireland, Galway
Semester II Examinations, 2007/2008
Exam Code(s) 3BC1, 4BC2, 4BC3, 4BC4, 4BC5, 1DB1, 1EM1
Exam(s) Third Year Commerce
Fourth Year Commerce (French)
Fourth Year Commerce (German)
Fourth Year Commerce (Italian)
Fourth Year Commerce (Spanish)
Higher Diploma in Business Studies
Module Code(s)
MS311
Module(s) Program Design and Development
Paper No.
Repeat Paper Special Paper
External Examiner(s) Professor Hans van der Heijden
Internal Examiner(s) Professor J.F. Collins
Ms. O. McHugh
Instructions:
Answer question ONE and TWO other questions.
Question 1 carries 40 marks, all other questions carry 30
marks.
You should spend no longer than 50 minutes on Q1.
Duration 2 hrs
No. of Answer Books
Requirements:
Handout
MCQ
Statistical Tables
Graph Paper
Log Graph Paper
Other Material
No. of Pages 6
Department(s) Accountancy and Finance
pf3
pf4
pf5

Partial preview of the text

Download Total Integer - Management Information Systems - Exam and more Exams Management Information Systems in PDF only on Docsity!

Ollscoil na hÉireann, Gaillimh

National University of Ireland, Galway

Semester II Examinations, 2007/

Exam Code(s) 3BC1, 4BC2, 4BC3, 4BC4, 4BC5, 1DB1, 1EM

Exam(s) Third Year Commerce Fourth Year Commerce (French) Fourth Year Commerce (German) Fourth Year Commerce (Italian) Fourth Year Commerce (Spanish) Higher Diploma in Business Studies

Module Code(s) MS

Module(s) Program Design and Development

Paper No. Repeat Paper Special Paper

External Examiner(s) Professor Hans van der Heijden

Internal Examiner(s) Professor J.F. Collins Ms. O. McHugh

Instructions: Answer question ONE and TWO other questions. Question 1 carries 40 marks, all other questions carry 30 marks. You should spend no longer than 50 minutes on Q1.

Duration 2 hrs No. of Answer Books

Requirements : Handout MCQ Statistical Tables Graph Paper Log Graph Paper Other Material

No. of Pages 6 Department(s) Accountancy and Finance

Q1. A restaurant offers the following items on its menu.

Appetisers: Soup (€3.50), Garlic Mushrooms (€5) and Caesar Salad (€4) Main Courses: Chicken (€12.50), Steak (€18) and Cod (€15) Desserts: Apple Pie (€5.50), Sherry Trifle (€5.50) and Ice-cream (€5.50)

Customers can only order one item from each section of the menu, but they do not have to order from each section of the menu. The total amount for each order must be displayed on the screen. Sometimes the restaurant places money-off-vouchers in the local newspaper. These allow a 10% discount on the total of the meal. If a customer has a voucher, then the discount checkbox must be selected on the screen and the appropriate discount calculated. The discounted total must also be displayed on the screen.

Sketch a user interface that waiters of the restaurant can use to enter the order for diners. On your design sketch, indicate and name all the controls.

Write the source code necessary for the functioning of the user interface design.

(40 marks)

Q

(a) Giving reasons for your answers, state what the output of the following piece of code will be if the command button ‘DisplayButton’ has been pressed. Ensure that you adhere to the formatting codes specified.

Public Class Form

Private Sub DisplayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TestStaticButton.Click

Dim totalInteger As Integer Dim totalDecimal As Decimal

totalInteger = (totalInteger + 20) / 2 totalDecimal = (totalDecimal + 5) * 2

Label1.Text = "Integer variable value is " & totalInteger.ToString() Label2.Text = "Decimal variable value is " & totalDecimal.ToString("C4")

End Sub End Class

(b) The code below contains 4 separate errors. Detail each error in your answer and indicate the line number where each error occurs.

1 Dim customerCountInteger as Integer = 10 2 Dim averageDecimal 3 Dim grandTotalDecimal As Decimal = 100 4 Dim messageString As String 5 6 If customerCountInteger > 0 7 averageDecimal = grandTotalDecimal / customerCountInteger 8 9 messageString = "Number of orders: " _ 10 & customerCountInteger.ToString() 11 & ControlChars.NewLine & ControlChars.NewLine _ 12 & "TotalSales: " & grandTotalDecimal.ToString("C") _ 13 & ControlChars.NewLine & ControlChars.NewLine _ 14 & "Average Sales: " & averageDecimal.ToString("C2") 15 MessageBox(messageString, "Sales Summary", MessageBoxButtons.OK, _ 16 MessageBoxIcon.Information) 17 Else 18 messageString = "No sales information to summarise" 19 MessageBox.Show(messageString, "Sales Summary", _ 20 MessageBoxButtons.OK, MessageBoxIcon.Information) 21 End If (12 marks)

(c) Sketch the Message Box specified at lines 15 and 16 of the code listed in part (b) above. Ensure to detail the exact output of the message as it would be displayed in the message box ( 3 marks)

Q

(a) When writing procedures in Visual Basic, variables can be passed to a procedure in two different ways i.e. byVal or byRef. Explain the differences between ByVal and ByRef and give an example of when each would be used.

(b) A car rental agency charges its customers €15 per day for car rental plus 0.15c per kilometre (km). The car rental agency has a software program that allows a user to: input the number of kilometres registered on the car prior to renting the car to a customer (initialReadingTextbox); input the number of kilometres registered on the car when it is returned to the car rental agency (finalReadingTextbox); and input the number of days the car was used (numberDaysUsedTextbox).

When the Calculate button is selected the following actions occur:

(i) Calculate the number of kilometres driven by the customer using the initial reading and the final reading input by the user (ii) Calculate the total charge for the car rental. (iii) Display the number of kilometres driven by the customer (numberKmDrivenTextbox) (iv) Display the total charge (totalChargeTextbox) for the car rental

A screenshot of what this program may look like is displayed above. You are required to write the code that will be executed when the Calculate button is selected.

(20 marks)

Q (a) A program in Visual Basic asks a user to input a whole number (n) between 0 and

  1. Write a piece of code containing a FOR loop that finds only the odd numbers up to and including n. (For example, if the user enters '11', the FOR loop will determine the odd numbers to be 1, 3, 5, 7, 9, and 11). This piece of code should store these numbers in a variable so that they could be displayed on screen later.