Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview Debugging is an essential skill. Programmers spend a high percentage of their time debugging rather than creating new functionality. For this actlvity, you will

image text in transcribedimage text in transcribedimage text in transcribed
Overview Debugging is an essential skill. Programmers spend a high percentage of their time debugging rather than creating new functionality. For this actlvity, you will review the code provided. It contains a variety of errors [for example: syntax, logical, and/or runtime errors). Your task is to x the code and explain how and why you xed it using inline comments. If you have any trouble with this assignment, reach out to your instructor early as you will need these skills for Projects One, Two, and Three. Prompt For this assignment. you will x the code provided and explain why and how you xed it using infline comments. 1. Open the Virtual Lab by clicking on the link in the Virtual Lab Access module and then navigate to the Visual Studio IDE. Alternatively, you may wish to open Visual Studio directly from your own machine. Create a new empty Visual Studio project and add an empty C++ source le, then copy the C++ code from the provided Calculatorcpp le into this new source le. Take your time to review the code, being sure to look for syntax, logic, and runtime errors. 2. Fix any errors that you nd. Use inline comments to explain how and why you xed the bugs. 3. Test your program. If you found and xed all the errors, your code should function as specied: a. The code should allow users to enter basic, one operator arithmetic expressions using integers or doubles. Then, it should calculate the result of the expression and output the results. For example. ifthe user inputs \"2 + 2,\" the calculator should output r'2 + 2 = 4.\" b. The operations the program should perform are addition [+l, subtracon (7], multiplication [*), and division (I). sin c. The user should be asked whether they wish to continue after evaluating each expression. If the user types "Y" or y. the program should it u ask for a new arithmec expression. If the user types "N" or n, the program should terminate with the message: \"Program Finished." Guidelines for Submission Submit your debugged CPP file to the assignment submission page. Refer to the Visual Studio Setup Guide you reviewed in the last module, and its section on saving your work, for further guidance on locating and submitting your new CPP file. Module Two Assignment Rubric Criteria Complete (100%) Proficient (85%) Not Complete (0%) Value Debugging Debugs code so that no Meets some "Proficient" Does not attempt criterion 40 errors remain and calculations criteria, but with errors or work correctly omissions such as one or two remaining bugs Code Functionality Code functions properly, Meets some "Proficient" Does not attempt criterion 30 allowing for basic, one criteria, but with errors or operator arithmetic omissions such as lack of expressions, using integers or decision points or incorrect double numbers with decision one operator calculations (+, points -, *, 1) In-Line Comments Explains how and why bugs Meets some "Proficient" Does not attempt criterion 30 were fixed criteria, but with errors or omissions such as forgetting to include why and how a bug was fixed Total: 100%/* Calculator . cpp Date: [Enter date] Author: [Your Name ] #include using namespace std; void main( ) char statement [100]; int opl, op2; char operation; char answers"Y" while (answer=='y") cout > op2 >> operation >> op1; if (operation == "+") ; cout > " = " > opl >

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

Step: 3

blur-text-image

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Estimate the number of degrees in the angle. 1. 2.

Answered: 1 week ago