Ask Question
11 October, 20:25

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. 11 October, 20:47
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers