is it necessary to use Microsoft approach in every class for finding software maintainability?
For finding software maintainability by using Microsoft approach, where normally we have to use following method
MI = MAX(0, (171 — 5.2 * ln(HV) — 0.23 * CC — 16.2 * ln(LoC)) * 100 / 171),
HV – Halstead Volume,
CC – Cyclomatic Complexity;
LoC – lines of code.
In my program i have few different type of classes .as example For "finding area "__problem i have ----"circle", "triangle","quadrilateral", "abstract","choice" classes .
do i have to use the approach for every individual class for finding software maintainability ?
The simples answer is no. This is only a heuristic formula created to assess code and drive code refactoring in order to achieving good maintainability. You can find many other interesting heuristics if you look for code smells (aka anti-patterns).
In the real world, you face challenges, like resource constraints (e.g. time, legacy, design options), which usually leads to decisions that create technical debt. So, do not worry so much about strictly following these formulas. They are guidelines to help in making good decisions while designing your software architecture.