Case-Based Critical Thinking Questions Case 1 - Tony’s Pizza & Pasta The restaur
ID: 3851176 • Letter: C
Question
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?
strSpecial(5) = "rigatoni"
strSpecial(6) = rigatoni
strSpecial(5) = rigatoni
strSpecial(6) = "rigatoni"
a.strSpecial(5) = "rigatoni"
b.strSpecial(6) = rigatoni
c.strSpecial(5) = rigatoni
d.strSpecial(6) = "rigatoni"
Explanation / Answer
Two 1-D Arrays
[1] strSpecial
[2] stsDays
Index of 1-D in Java Start With Position :- 0 and String Content Defined in double Quota
SUN 0
MON 1
TUE 2
WED 3
THR 4
FRI 5
SAT 6
So [a] strSpecial(5) = "rigatoni"