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 needs to calculate sales tax for purchases. You decide to simplify the code by putting the sales tax calculation in a function. The returned value from the function is then added to the Subtotal, and the result is stored in the decTotal variable. Which of the following statements will call the GetSalesTax function and return a value to be used in the Total calculation?

A. decTotal = decSubtotal + GetSalesTax()
B. decSubtotal + GetSalesTax(decSubtotal)
C. decTotal = decSubtotal + GetSalesTax(decSubtotal)
D. decTotal = decSubtotal + GetSalesTax(decSubtotal As Decimal)

Answer: C

Computer Science & Information Technology

You might also like to view...

A short-term interruption in electrical power availability is known as a ____.

A. ?fault B. ?brownout C. ?blackout D. ?lag

Computer Science & Information Technology

You can use the methods in the Collections class to

a. find the maximum object in a collection based on the compareTo method. b. find the maximum object in a collection using a Comparator object. c. sort a collection. d. shuffle a collection. e. do a binary search on a collection.

Computer Science & Information Technology