Ask Question
5 September, 14:31

Case-Based Critical Thinking Questions Case 1: Tony's Pizza & Pasta Tony's Pizza & Pasta restaurant uses an application to update and display menu items and the related price information. Which of the following statements assigns the daily special of lasagna to Tuesday? a.

strSpecial (5) = "rigatoni"

b.

strSpecial (6) = rigatoni

c.

strSpecial (5) = rigatoni

d.

strSpecial (6) = "rigatoni"

+3
Answers (1)
  1. 5 September, 17:55
    0
    Case-Based Critical Thinking Questions

    Case 1 - Tony's Pizza & Pasta

    The restaurant uses an application to update and display menu items and the related price information.

    Daily "Chef's Specials" are stored using two one-dimensional parallel arrays. The days of the week are stored in the strDays array, with Sunday as the first element. The daily special for each day is stored in a parallel array named strSpecial. Which of the following statements assigns Friday's special, which is rigatoni, to the appropriate element?

    a. strSpecial (5) = "rigatoni"

    b. strSpecial (6) = rigatoni

    c. strSpecial (5) = rigatoni

    d. strSpecial (6) = "rigatoni"

    Explanation:

    The bolded option is the correct answer; option A - strSpecial (5) = "rigatoni"

    Two one-dimensional arrays are use; one for storing days of the week (strDays) and another for storing daily special (strSpecial).

    Our concern is assigning rigatoni as a Friday's special. Array uses zero based index for counting; it start counting from zero, so, its first element is at index zero. Since Sunday is the first day; we have the following index:

    Sunday = 0

    Monday = 1

    Tuesday = 2

    Wednesday = 3

    Thursday = 4

    Friday = 5

    Saturday = 6

    Since, we are assigning rigatoni to Friday, we have:

    strSpecial (5) = "rigatoni"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Case-Based Critical Thinking Questions Case 1: Tony's Pizza & Pasta Tony's Pizza & Pasta restaurant uses an application to update and ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers