Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(6 points - Correctness i.e. you will get points based on the quality of your refactor and reflection) Refactoring - In this question you will
(6 points - "Correctness" i.e. you will get points based on the quality of your refactor and reflection) Refactoring - In this question you will select a portion of your PA1 or PA2 implementation that you believe could be improved through a combination of correcting the functionality (if applicable) and refactoring to achieve a clearer and more elegant solution. 5. a. Show the before and after of the code you refactored b. Explain what you identified as needing improvement and describe how your refactored code is improved in style and behavior (if applicable) You should answer this question on your own sheet(s) and attach the answer (electronically) to the PDF document you use to submit the answers to questions 1-4. Please follow the format below in your answer. If your code will not fit side by side (which is perfectly fine) please put before first, and then after second, followed by your explanation Example format: Before After void do_everything) /1 do thing 1 // if thing 1 worked bool do_thing1().; void do thing2(); void do thing3(); // do thing 2 // finally do thing 3 int main(void) (do, thing!()) do_thing2(); if { int main (void) - do_everything(); do_thing3); Here you will explain what were some of the problems you identified with the original code and what improvements did you get from your refactored code
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