Ask Question
4 August, 02:54

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"

+5
Answers (1)
  1. 4 August, 04:20
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers