Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For each problem, study the supplied code, and list the code smells you see. For this exercise the code smells should be one of these:
For each problem, study the supplied code, and list the code smells you see. For this exercise the code smells should be one of these: long method, large class, duplicate code (aka cut and paste code), long parameter list, primitive obsession, and magic numbers. For each code smell, list the line numbers of the code where the smell is focused, identify the design principle(s) that are violated, and identify some program change that the smell would complicate. Removes Bus Route * @param route public static void removeBus Route(BusRoute route) { public class database public static List group Table; public static List dormTable; public static List studentorgsTable; public static List busRoutetable; public static List intramuralSportTable: public static List gymequip; public static List gymrent; public Calendar calendar: * Gets busroute based on name * @param routeName * @return BusRoute public Bus Route getBus Route(String routeName) { Gets bus based on number * @param bus Number * @return Bus public database throws FileNotFoundException public Bus getBus(int bus Number) { * Adds fair to to table * @param fair * Adds lot to table * @param 1 public static void addFair(Fair fair){ public static void addLot(Lot 1){ * Rctums fair based on building and date * @param building * @parum date * @return Fair * Finds a lot * @param id * @return Lot public static Fair getFair(String building. Date date) { public static Lot findLot(String id) { * Removes fair from fair table * @param fair * Removes lot * @param 1 public static void removeFair(Fair fair){ public static void removeLot(Lot 1){ * Adds student to table * @params * Adds gym equipment * @param addnew * @return boolean public static void addStudent(students) { public static boolean acidGymEquipment(GymEquipment addnew) { * Adds bus to table * @param bus public static void addBus(Bus bus){ * Finds gym equipment and returns it * @param idname * @return GymEquipment public static GymEquipment findGym Equipment(String idname) { * Removes bus from table * @param bus public static void removeBus(Bus bus) * Removes gym equipment * @param idname * @return Adds bus route * @param route public static boolean removeGymEquipment(String idname) public static void addBus Router Buskoute route) { public String delete(iymItem(String id) { Smells and locations? Design principles? Maintenance Consequences
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started