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.
Changing the function's parameter list requires no changes in any of the calling modules.
A new defect introduced into the function can affect all 14 modules at once, so its tests matter more.
A correction to the function's logic is made once and takes effect in every module that calls it.
Once the code is shared, none of the 14 modules needs tests that exercise date parsing.
Unlock full course notes by signing up
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.
Reusing list utilities without changing the original
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:
copy_scores(scores) returns a separate list containing the same numeric scores in the same order.
sort_scores(scores) changes the supplied list into ascending order and returns None.
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.