Case-Based Critical Thinking Questions
??
Case 9-2
Gregor, a software developer, is developing a calendar application. He has to use severalifconditional statements to ensure that the calendar displays the exact number of days present in each month of each year. He creates adayCountarray to keep track of the number of days in each month.
?Gregor wants to ensure February contains 29 days only in the year 2020 as it is a leap year. Which of the following should Gregor use to set the value in thedayCountarray?
A. if (thisYear === 2020) {dayCount[1] = 29;}
B. if (dayCount=29){2020;}
C. if {thisYear = 2020;dayCount[1] == 29;}
D. if {dayCount=29 && this year=2020;}
Answer: A
Computer Science & Information Technology
You might also like to view...
Using the data bars conditional formatting, how is the highest value represented?
A) By the darkest bar B) By the tallest bar C) By the most number of bars D) By the longest bar
Computer Science & Information Technology
What are the installation requirements for Hyper-V when using Windows Server 2016?
What will be an ideal response?
Computer Science & Information Technology