Question 14: A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements.
My answer: B: In line 6, < should be changed to ≥.
Why it’s wrong: By making this change, the procedure will immediately return true any time it encounters a value that is greater than or equal to the preceding value. It will not check any subsequent values in the list.
Correct answer: C: Lines 8 and 12 should be interchanged.
Why it’s right: As is, the procedure traverses numberList from left to right and returns true whenever it encounters a value that is less than the preceding value. If it never encounters such a value, false is returned. This has the effect of returning true whenever the list is not increasing and returning false whenever the list is increasing, which is the opposite of what is intended. By interchanging lines 8 and 12, the procedure will return true or false appropriately.
Question 35: A city maintains a database of all traffic tickets that were issued over the past ten years. The tickets are divided into the following two categories.
The data recorded for each ticket include only the following information.
Which of the following questions CANNOT be answered using only the information in the database?
My answer: C: In the past ten years, were there any months when moving violations occurred more often than nonmoving violations?
Why it’s wrong: I quite literally misclicked :skull:
Correct answer: B: In the past ten years, were nonmoving violations more likely to occur on a weekend than on a weekday?
Question 48: Which of the following is an example of an attack using a rogue access point?
My answer: C: An unauthorized individual poses as a network administrator and attempts to trick a user into providing personal information.
Why it’s wrong: Tricking a user into providing personal information is an example of a phishing attack. While this type of attack can be used to obtain personal information, it does not allow unauthorized individuals to intercept information transmitted on a network.
Correct answer: A: An unauthorized individual gains the ability to view network traffic by connecting to a network router that uses weak or no security measures.
Why it’s right: A rogue access point is a wireless access point that gives unauthorized access to secure networks. Data sent over public networks can be intercepted, analyzed, and modified. One way that this can happen is through a rogue access point.
Question 52: A sorted list of numbers contains 128 elements. Which of the following is closest to the maximum number of list elements that can be examined when performing a binary search for a value in the list?
My answer: C: 64
Why it’s wrong: While a binary search on a list of length 128 will eliminate 64 elements on the first iteration, fewer than 64 iterations are needed to eliminate all elements.
Correct answer: B: 8
Why it’s right: The binary search algorithm starts at the middle of the list and repeatedly eliminates half the elements until the desired value is found or all elements have been eliminated. For a list with 128 elements, the list will be cut in half a maximum of 7 times (causing 8 elements to be examined). The list will start with 128 elements, then 64 elements, then 32 elements, then 16 elements, then 8 elements, then 4 elements, then 2 elements, then 1 element.
Question 59: RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone’s GPS unit to track a user’s location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs.
At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application shares the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other’s contact lists or if they typically run at similar speeds.
A basic RunRoutr account is free, but it displays advertisements that are targeted to individual users based on data collected by the application. For example, if a user’s running route begins or ends near a particular store, the application may display an advertisement for that store. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application.
My answer: C: The usernames on Adrianna’s contact list
Why it’s wrong: Misclick (it’s becoming a real problem)
Correct answer: B: The current locations of other RunRoutr users
Question 59: RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone’s GPS unit to track a user’s location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs.
At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application shares the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other’s contact lists or if they typically run at similar speeds.
A basic RunRoutr account is free, but it displays advertisements that are targeted to individual users based on data collected by the application. For example, if a user’s running route begins or ends near a particular store, the application may display an advertisement for that store. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application.
My answer: A: The application allows users to identify all other users in a particular area.
Why it’s wrong: Misunderstood the problem, thought it was saying which one was a problem not was not a problem
Correct answer: C: Users of the application may see health benefits as a result of the application encouraging them to exercise with each other.