A community-resource navigator must model roads connecting locations so that it can reason about routes between them. Which data structure is the most appropriate representation for those relationships?
12 — Foundations Capstone Online Quiz Questions
Use this free practice quiz with 20 questions to review 12 — Foundations Capstone, test your knowledge, and prepare for your next test or exam.
True or false: In a resource record, storing an unknown capacity as 0 is potentially misleading because 0 means that the resource has no capacity.
- A
True
- B
False
Which data structure should a capstone use when records must be retrieved by a key such as an identification number? Enter the data-structure name in words.
Complete the architecture description: The reads and validates records.
Which activity is best classified as a unit test for the resource navigator?
- A
Testing the complete application through its user interface
- B
Testing one filtering function with available and unavailable records
- C
Testing whether multiple modules work together after loading a file
- D
Testing whether users understand the system's ethical trade-offs
True or false: A test suite alone can prove that an algorithm will not fail on any untested input within its defined domain.
- A
True
- B
False
Select all situations that should be included as edge-case tests for the resource navigator.
- A
An empty input collection
- B
A typical collection containing several valid matching records
- C
Two resources with tied distances
- D
A record with invalid coordinates
What proof concept can state that, after each iteration of the filtering loop, the results collected so far are exactly the eligible records processed so far? Enter the concept in words.
Complete the complexity analysis for filtering and ranking: scanning n records takes time, and sorting m matching records takes time.
Select all areas that belong in an ethical evaluation of a community-resource navigator.
- A
Whether collected personal data is necessary and protected
- B
Whether the system works for people with disabilities and underserved communities
- C
Whether the implementation uses the most complex available algorithm
- D
Whether users can understand uncertainty and challenge or correct outputs
A team expects its resource dataset to grow but has not yet measured a performance problem. According to the recommended capstone process, which approach should it use before optimizing?
- A
Begin with the most sophisticated spatial structure available
- B
Build the simplest correct solution before optimizing
- C
Optimize before defining the problem so performance targets guide the specification
- D
Replace testing with complexity analysis once the baseline is implemented
Explain how a strong computer science capstone connects problem definition, representation, program design, algorithms, complexity analysis, correctness, testing, ethical evaluation, and communication. Give concrete examples of how decisions in one area affect another.
The filtering-and-ranking procedure has time complexity O(n + m log m), where m is the number of matches and m ≤ n. What is its worst-case time complexity when every record matches?
- A
O(1)
- B
O(n)
- C
O(n log n)
- D
O(log n)
A community-resource system does not know the capacity of some shelters. Which representation best preserves the meaning of the data?
- A
Store unknown capacity as 0
- B
Omit the capacity field from every record
- C
Represent the capacity explicitly as unknown
- D
Replace unknown capacity with the average capacity
True or false: A sufficiently large test suite alone proves that an algorithm is correct for every input in its defined domain.
- A
True
- B
False
Which design best supports maintainability and testing in the community-resource navigator?
- A
One function reads files, filters records, prints results, and changes global state
- B
Separate functions or layers handle input validation, data storage, algorithmic work, output, and evaluation
- C
Put all records and algorithms in the user-interface layer
- D
Use a single global procedure so that every component shares state
Which data structure is most appropriate when a capstone component primarily needs to track whether an item is a member and prevent duplicates?
Which statement is a suitable loop invariant for the resource navigator’s filtering loop?
- A
After processing the first k records, the list contains exactly the eligible records among those k records, paired with their distances
- B
After processing the first k records, the list contains every input record, whether eligible or not
- C
After processing the first k records, the list is already sorted by final distance
- D
After processing the first k records, the list contains only the single closest resource overall
What type of test should be added when a newly discovered defect has been reproduced and corrected, so that the defect does not return in a later revision?
A resource navigator scans n records, computes distances for the m matching records, and sorts those m records. Assuming distance computation is constant time, what is the procedure’s approximate time complexity?
- A
O(m)
- B
O(nm)
- C
O(n + m log m)
- D
O(log n + m)