A sports application must display scores from highest to lowest while preserving the original list, including its order and any repeated scores. An existing library provides these functions:
Complete the reuse plan with the appropriate function names, without parentheses.
First, call on the original list and assign its returned list to working. Next, call sort_scores(working) without assigning its return value. Finally, call on working, again without assigning its return value, and display working.
Unlock full course notes by signing up
Consequences of one shared function
A team maintains one shared parse_date function that is called from 14 modules, instead of keeping 14 pasted copies of the same code. Which of the following statements about this design are true? Select all that apply.
Adopting a third-party library
A project team wants to reuse an open-source library for reading spreadsheet files instead of writing its own parser. Put the steps for adopting the library into the order the team should carry them out.
Planning verification for a shared export component
Four applications reuse the same file-export component. Each application runs in three supported operating environments, and every application must be checked in every environment.
The verification plan has two parts:
Run 18 checks of the shared component once for the whole project. Each takes 0.4 s.
Break-even uses for a reusable component
A developer can spend 6 extra hours turning an internal logging module into a reusable component with general settings, documentation and tests. Each later project that adopts the component avoids 1.5 hours of writing its own logging code, but spends 0.25 hours integrating and configuring the component. Using a time-only break-even model, what is the minimum number of projects that must reuse the component for the total time saved to at least equal the 6-hour up-front cost? Answer as a whole number of projects.