appendix-a

Appendix A. Appendix

 

This appendix contains the solutions to the exercises.

A.1 Chapter 3

3.1 Calculate cognitive complexity

The total cognitive complexity of the code below is 10.

A.2 Chapter 4

4.1 Refactoring a class into a record

A.3 Chapter 5

5.1 From traditional switch to enhanced switch

A.4 Chapter 6

6.1 Refactor this imperative code using streams

A.5 Chapter 7

7.1 Spot and refactor antipatterns

A.6 Chapter 8

8.1 Optimize a customer table

8.2: Greener autocomplete

8.3 Reducing the bandwidth usage of an endpoint

8.4 Optimizing cache memory management

8.5 Making a sensor summary generator greener

A.7 Chapter 9

9.1 Refactoring for durability