This is a three part question. You are modifying some code for the department of Homeland Security v

This is a three part question. You are modifying some code for the department of Homeland Security void terrorism (Action terrorist_action) switch (terrorist_action) case PLOT_ATTACK: if (alert_level — GREEN) alert level = ORANGE; else if (alert_level — ORANGE) condemn_action(); alert level = RED: break; case ALL_QUIET: if (alert level == RED) alert level = ORANGE; else if (alert level == ORANGE) alert level – GREEN; else go_golfing0; break; default: break; // you may assume this never happens Part A) What principle does this violate? Part B) Why is this violation a bad thing (explain)? Part C) What pattern can you use to solve it and how would you apply the pattern.

 

Looking for a Similar Assignment? Hire our Top Uk Tutors while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Active Discount Code FREE15