Case-Based Critical Thinking QuestionsCase 1: MTN OutdoorYou have just started working for MTN Outdoor as a programmer. Your first assignment is to review and correct various code to use sub procedures and/or functions.
An application allows a user to scan a bar code of an item to determine the item price. A message that contains the item name and the item price should display. You need to create a Sub procedure to display the message. Which of the following procedure headers should be used?

A. Private Sub DisplayMessage(ByVal strItem As String, ByVal decPrice As Decimal)
B. Private Function DisplayMessage(ByVal strItem As String, ByVal decPrice As Decimal)
C. Private Sub DisplayMessage(ByRef strItem As String, ByRef decPrice As Decimal)
D. Private Sub DisplayMessage(ByVal strItem As String, ByRef decPrice As Decimal)

Answer: A

Computer Science & Information Technology

You might also like to view...

A scanner attaches to an unpowered USB hub. The scanner is not detected when attached to the hub, but another USB device works fine. What is the first thing you should check?

A) Ensure the correct USB cable is being used. B) Ensure the scanner is receiving enough power to power on. C) Ensure the USB cable is not too long. D) Ensure the computer USB power is not disabled.

Computer Science & Information Technology

Why should a book cover have a primary focal point?

What will be an ideal response?

Computer Science & Information Technology