Activity 7.01: Creating Decorators for Call Counting
As a developer of a backend service for a website, you are tasked with creating a solution that will enable the operations department to have clear auditing on the behavior of the service. For that, the app is required to have a tally of all class instantiations and method invocations.
In this activity, you're going to create class and method decorators that can be used to count class instantiations and method invocations. You will create a class that contains data about a person and use the decorators to count how many such objects were created and how many times each method was called. After you have constructed several objects and used their properties, take a look at the values of the counters.
The aim of this activity is to demonstrate the uses of class and method decorators in order to address a cross-cutting concern of your application, without changing the functionality of the given class. You should have...