Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!