What mehen emits
What counts as “public”
The exact rule is language-specific:How to read it
A “few” public attributes is usually fine. Many can mean:- Data classes / records:
NPA = number of fieldsis expected and benign. - Property bags or “god objects”: NPA grows past 10 — refactor candidate.
References
- Lorenz, M. & Kidd, J. (1994). Object-Oriented Software Metrics: A Practical Guide. Prentice Hall.
- Chidamber, S. R. & Kemerer, C. F. (1994). A Metrics Suite for Object Oriented Design. IEEE TSE 20(6): 476–493. DOI.
- Briand, L. C., Daly, J. W. & Wüst, J. K. (1998). A Unified Framework for Coupling Measurement in Object-Oriented Systems. IEEE TSE 25(1): 91–121. DOI.