Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview: Debugging is the process of finding and fixing errors (bugs/defects) in your code. It is an essential skill for any programming. Bugs can take

Overview: Debugging is the process of finding and fixing errors (bugs/defects) in your code. It is an essential skill for any programming. Bugs can take many forms: typos, incorrect syntax, missing or improperly used elements (quotations, parentheses, spaces, etc.), as well as larger issues that result from coded items interacting in an unanticipated manner. Regardless of the skill of the programmer, bugs are a part of coding and learning to locate them in your code takes patience and practice.

Prompt: This assignment presents you with broken code that you will need to debug. Analyze the existing source code to identify and correct all bugs. Include a brief written summary of the process you used, the issues you found, and how you corrected them.

The following critical elements should be addressed in your project submission:

Locate and fix the multiple syntax errors.

Ensure that loops/flow control statements function properly.

Edit the code to account for case-sensitivity of variables .

Verify that the program output matches the problem statement requirements, fixing defects as necessary.

Include a brief summary of your debugging process and the errors you corrected.

// Overloading.cpp : This code contains five errors before it will work as desired. Find those errors,

// document a description of the errors and their fix, and fix them. Try using the debugger to

// step through the program to find the bugs. As you step through, take notice of the information

// you can see.

//

#include "stdafx.h"

#include

#include

using namespace std;

int add(int, int);

double add(double, double);

int main()

{

int a, b, x;

float c, d, y;

cout << "Enter two integers ";

cin >> a >> b;

x = add(a, c);

cout << "Sum of integers: " << x << endl;

cout << "Enter two doubles ";

cin >> c >> d;

y = add(a, b);

cout << "Sum of doubles: " << y << endl;

return 0;

}

int add(int a, int b)

{

int sum;

sum = a + b;

}

double add(double a, double b)

{

double sum;

sum = a + b;

return sum

}

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

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions

Question

(4) How many experiments will be run in this example?

Answered: 1 week ago