Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code Fragment-1:1 ); while(t input.equals(ext ) Scanner src = new Scanner(System.in): System.out.println(Would you like to test the Car emission amount input src.next(): if(input.hasNext() && input.equals(yes))

image text in transcribed

Code Fragment-1:1 ); while(t input.equals("ext ) Scanner src = new Scanner(System.in): System.out.println("Would you like to test the Car emission amount input src.next(): if(input.hasNext() && input.equals("yes")) { em 15sionAmount car.testEmissions() System.out.println(tests -- Car Emissions: entssionAmount: emissionAmount : ON System.out.println("Would you like to test the Truck emission amount: input src.next(): 17 input.hasNext() 86 input.equals("yes")) { emission Andunt truck.testEmissions : System.out.println(tests --Truck Emissions : emissionAmount); emissionAmount = ): System.out.println("Would you like to test the Motorcycle emission amount : input = src.next(): if(input.hasNext() 66 input.equals("yes")) { emission Amount = motorcycle.testEmissions System.out.println(tests -- Motorcycle Emissions: emission Amount: emission Amount : System.out.println("Would you like to test the Semi Truck emission amount: "); input Src.next(): it (input.hasNext() 6 input.equals("yes")) { emissionAmount = Semi Truck. testeissions : System.out.println(tests Semi Truck Emissions emission Amount) emissionAmount = 0; System.out.println("Would you like to test the car emission amount Input Src.next(): if(input.hasNext() && input.equals("yes")) { emissionAmount van. testEmissions() System.out.println(tests -- Van Emissions emission Amount: emissionAmount = Part a (5 pts): Select a Code Smell: 1. Duplicate Codel 2. Long Parameter 3. Large Classi 4. All of the above! Part b (5 pts): Select the violation of design fundamental design principles which is most responsible for the above smell: 1. Separation of Concern! 2. Abstraction 3. Information Hiding 4. None of the Above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions