Exercise 1: A Second Independently-Testable Formatter Method — Possible Solution ==================================================================== THE NEW METHOD ------------------------------ class PayrollReportFormatter: def format_report(self, total): return f"Total: ${total:.2f}" def format_summary_line(self, total, employee_count): return f"{employee_count} employees, total ${total:.2f}" Follows this chapter's own format_report exactly - takes only the values it needs as plain arguments, with no reference to PayCalculator anywhere in its own signature or body. VERIFYING IT TESTS WITH FAKE VALUES, ZERO DEPENDENCY ------------------------------ format_summary_line tested with fake values, zero PayCalculator dependency: 42 employees, total $9999.99 Calling formatter.format_summary_line(9999.99, 42) - two entirely fabricated values, no PayCalculator constructed anywhere - correctly produces the formatted string. Exactly like this chapter's own format_report, this new method never needed real payroll data to be verified as working correctly. WHY THIS CONFIRMS THE SPLIT GENERALIZES, NOT JUST TO ONE METHOD ------------------------------ This chapter's own finding showed ONE formatter method staying independently testable after the SRP split. This exercise confirms a SECOND, different formatter method inherits the identical property automatically - not because of anything special about this specific method, but because PayrollReportFormatter's own class boundary already excludes any dependency on PayCalculator. Every future method added to this class, as long as it only formats values it's handed directly, gets this same testability for free. WHY THIS WORKS AS AN ANSWER ------------------------------ The new method follows this chapter's own established formatter pattern exactly, and it's verified working correctly with fake inputs rather than assumed to inherit the property just because it lives in the same class.