Cohesion
Cohesion is a measurement of the correlation between components in a module. Ideally, you should clarify the responsibilities and division of labor of each component.
IfCodeThe scope of the association between them is too wide, and maintenance will be very difficult-because you need to modify the relevant Code while modifying some of the Code.
The preceding paramhandler class aggregates related processing processes. The class methods used to process XML can share data, and changes to one class method can be easily reflected in another method.
Coupling
When the code of each part of the system is closely bound together, it will produce tight coupling. This is a change in one component that forces other components to change accordingly. Tight coupling is not unique to procedural code, but procedural code is prone to coupling issues.