big idea 1 questions
Which development process breaks the requirements down into small modules and adds the code once working to the projects as a whole? Additive Incremental Iterative Spiral
Answer: B
Which method of finding errors is most useful to identify logic errors? Creating new test cases Handtracing Rerunning the program with different inputs to see the impact on outputs Running a simulation
Answer: B
What is a benefit of understanding a problem before coding? a. A better designed program is created to handle all the needed functionality. b. Less testing is required. c. Little or no documentation is then needed. d. Users will not need training to use the program
Answer: A
What is a crucial step in an iterative development process? a. Feedback b. Preparing prototypes c. Meeting deadlines d. Meeting budget constraints
Answer: A
What is one way to debug a program? Add temporary print messages to determine program values Test with different data values each time Document the error in the user guide and online help text Override the error with the correct value
Answer: A
What is one way to ensure testing is thorough? Create expected results prior to testing Create a diagram of the program's processing Execute the code to ensure it runs. Add temporary DISPLAY statements to see intermediate results in the program.
Answer: A
A student is creating an application that allows customers to order food for delivery from a local restaurant. Which of the following is LEAST likely to be an input provided by a customer using the application? The address where the order should be delivered The cost of a food item currently available for order The credit card or payment information for the purchaser The name of a food item to be included in the delivery
Answer: B
A student wrote the following code segment which displays true if the list myList contains any duplicate values and displays false otherwise. The code segment compares pairs of list elements setting containsDuplicates to true if any two elements are found to be equal in value. Which of the following best describes the behavior of how pairs of elements are compared? The code segment iterates through myList comparing each element to all other elements in the list. The code segment iterates through myList comparing each element to all subsequent elements in the list. The code segment iterates through myList comparing each element to the element that immediately follows it in the list. The code segment iterates through myList comparing each element to the element that immediately precedes it in the list.
Answer: B
DineOutHelper is a mobile application that people can use to select a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app. A user who is organizing a meal with a group selects all the members of the group from the user's contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members' allergies and dietary restrictions. Suppose that Alejandra is using DineOutHelper to organize a meal with Brandon and Cynthia. Which of the following data is not provided by Alejandra but is necessary for DineOutHelper to recommend a restaurant for the group? Brandon's contact list Information about which restaurants Brandon and Cynthia have visited in the past Information about which food allergies and dietary restrictions can be accommodated at different restaurants near Alejandra II only III only II and III only I II and III
Answer: B
In the following procedure the parameter max is a positive integer. PROCEDURE printNums(max) { count ← ← 1 REPEAT UNTIL(count > max) { DISPLAY(count) count ← ← count + 2 } } Which of the following is the most appropriate documentation to appear with the printNums procedure? Prints all positive even integers that are less than or equal to max. Prints all positive odd integers that are less than or equal to max. Prints all positive even integers that are greater than max. Prints all positive odd integers that are greater than max.
Answer: B
In the following procedure the parameter numList is a list of numbers and the parameters j and k are integers. PROCEDURE swapListElements(numList j k) { newList ← ← numList newList[j] ← ← numList[k] newList[k] ← ← numList[j] RETURN(newList) } Which of the following is the most appropriate documentation to appear with the swapListElements procedure? Returns a copy of numList with the elements at indices j and k interchanged. The value of j must be between 0 and the value of k inclusive. Returns a copy of numList with the elements at indices j and k interchanged. The values of j and k must both be between 1 and LENGTH(numList) inclusive. Interchanges the values of the parameters j and k. The value of j must be between 0 and the value of k inclusive. Interchanges the values of the parameters j and k. The values of j and k must both be between 1 and LENGTH(numList) inclusive.
Answer: B
A homework assignment consists of 10 questions. The assignment is graded as follows. Number of Correct Answers Grade 9-10 check plus 7-8 check Under 7 check minus Let numCorrect represent the number of correct answers for a particular student. The following code segment is intended to display the appropriate grade based on numCorrect. The code segment does not work as intended in all cases. For which of the following values of numCorrect does the code segment NOT display the intended grade? Select two answers. 9 8 7 6
Answer: B and C
How do event-driven programs progress? They run in a linear fashion from start to end The code executes sequentially The code executes when an action occurs that it is programmed to recognize The code runs iteratively
Answer: C
In the following procedure assume that the parameter x is an integer. Which of the following best describes the behavior of the procedure? It displays nothing if x is negative and displays true otherwise. It displays nothing if x is negative and displays false otherwise. It displays true if x is negative and displays nothing otherwise. It displays true if x is negative and displays false otherwise.
Answer: C
In the following procedure the parameters x and y are integers. Which of the following is the most appropriate documentation to appear with the calculate procedure? Displays the value of x + (y / x). The value of the parameter x must not be 0. Displays the value of x + (y / x). The value of the parameter y must not be 0. Displays the value of (x + y) / x. The value of the parameter x must not be 0. Displays the value of (x + y) / x. The sum of the parameters x and y must not be 0.
Answer: C
The following procedure is intended to return true if the list of numbers myList contains only positive numbers and is intended to return false otherwise. The procedure does not work as intended. PROCEDURE allPositive(myList) { index ← 1 len ← LENGTH(myList) REPEAT len TIMES { IF(myList[index] > 0) { RETURN(true) } index ← index + 1 } RETURN(false) } For which of the following contents of myList does the procedure NOT return the intended result? [-3 -2 -1] [-2 -1 0] [-1 0 1] [1 2 3]
Answer: C
Three students in different locations are collaborating on the development of an application. Which of the following strategies is LEAST likely to facilitate collaboration among the students? Having all three students participate in frequent video chat sessions to discuss ideas about the project and to provide feedback on work done so far Having all three students use an online shared folder to contribute and discuss components to be considered for use in the application Having all three students write code independently and then having one student combine the code into a program Having all three students work in a shared document that each can edit to provide comments on the work in progress
Answer: C
What do using surveys interviews and observations identify? a. Device specifications b. Program errors c. User requirements d. Valid program input
Answer: C
What is an example of event-driven programming? Prompting a user to type in a response Using constraints for data values in place of variables A mobile device that orients to a new position A microphone transmitting audio data to a program.
Answer: C
Which of the following is not a common step in many software development processes? a. Designing b. Investigating c. Identifying patterns d. Testing
Answer: C
A company that develops mobile applications wants to involve users in the software development process. Which of the following best explains the benefit in having users participate? Users can identify and correct errors they encounter when using released versions of the software. Users can review the algorithms used in the software to help improve their efficiency. Users can provide documentation for program code at the end of the software development process. Users can provide feedback that can be used to incorporate a variety of perspectives into the software.
Answer: D
Collaboration can provide which of the following? a. Several points of failure b. Clean data c. Duplication of effort d. Better products resulting from different perspectives
Answer: D
Consider the following code segment. Which of the following best describes the behavior of the code segment? The code segment displays the value of 2(5×3) by initializing result to 2 and then multiplying result by 3 a total of five times. The code segment displays the value of 2(5×3) by initializing result to 2 and then multiplying result by 5 a total of three times. The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 3 a total of five times. The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 5 a total of three times.
Answer: D
In the following code segment score and penalty are initially positive integers. The code segment is intended to reduce the value of score by penalty. However if doing so would cause score to be negative score should be assigned the value 0. For example if score is 20 and penalty is 5 the code segment should set score to 15. If score is 20 and penalty is 30 score should be set to 0. The code segment does not work as intended. Line 1: IF(score - penalty < 0) Line 2: { Line 3: score ← ← score - penalty Line 4: } Line 5: ELSE Line 6: { Line 7: score ← ← 0 Line 8: } Which of the following changes can be made so that the code segment works as intended? Changing line 1 to IF(score < 0) Changing line 1 to IF(score + penalty < 0) Changing line 7 to score ← score + penalty Interchanging lines 3 and 7
Answer: D
What is a benefit of using a software development design process? a. By following the process the code will work the first time. b. Using the process the code will be efficient regardless of a programmer's experience. c. The code will be developed in 50% less time using a development/design process. d. The process is iterative resulting in a better program.
Answer: D
Why is documentation important? To explain a program's purpose and functionality To make it easier to understand and modify the code later To be useful for training people on how to use the program All of the above
Answer: D
Why should boundary values be tested? Testing boundary value is not necessary. To ensure they are identified as errors To ensure warning messages are sent about the boundaries. To ensure the program does not include too few or too many elements
Answer: D
Which phase in the development process determines how to meet the application requirements? a. Analysis b. Design c. Programming d. Testing
Answer: B
Attempting to access an invalid index in a list results in what type of error? Logic error Overflow error Runtime error Syntax error
Answer: C
What type of error breaks the rules of the programming language like a grammatical error? Logic error Overflow error Runtime error Syntax error
Answer: D
A company that develops educational software wants to assemble a collaborative team of developers from a variety of professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team? Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing. Collaboration that includes diverse backgrounds and perspectives can help the team anticipate the needs of a variety of software users. Collaboration that includes diverse backgrounds and perspectives can help the team avoid bias. Collaboration that includes diverse backgrounds and perspectives can reflect the strengths of the individual team members.
Answer: A
DineOutHelper is a mobile application that people can use to select a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app. A user who is organizing a meal with a group selects all the members of the group from the user's contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members' allergies and dietary restrictions. Suppose that Alejandra is using DineOutHelper to organize a meal with Brandon and Cynthia. Which of the following data are needed for DineOutHelper to recommend a restaurant for the group? Each group member's list of food allergies or dietary restrictions Alejandra's geographic location The usernames of the people on Brandon and Cynthia's contact lists I and II only I and III only II and III only I II and III
Answer: A
If your program executes without errors but the results are incorrect what type of error do you likely have? Logic error Round-off error Runtime error Syntax error
Answer: A