Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 1.4, Problem 26STE
Program Plan Intro
- A fault in a program denotes a bug and process of elimination of bugs is termed as debugging.
- A bug denotes an error, failure or fault in a program that may generate improper result.
- The process of fixing bugs is termed as debugging.
- Some of computer systems are able to deter, detect or auto correct different computer bugs during operations.
- The bugs arise from errors made in source code of program.
- The bugs can cause program to freeze computer in terms of processing.
Types of program errors:
- The three main types of program error includes:
- Syntax errors:
- The compiler catches certain mistakes and denotes an error message.
- It denotes violation of syntax of programming language.
- The compiler issues an error message if syntax is been violated.
- The compiler sometimes raises a warning message while any unusual programming practices.
- Run-time errors:
- It denotes type of error that system detects when a program is run.
- The system may detect certain run-time errors and displays appropriate error message.
- It may be an issue with numeric calculations.
- Logic error:
- It denotes a mistake in underlying
algorithm . - It may be an issue while translation of algorithm to program code.
- It denotes that there is no error in syntax while the result obtained is not as expected by user.
- These types of errors could be corrected by careful examination of algorithm and translation.
- It denotes a mistake in underlying
- Syntax errors:
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a program, using the syntax of whatever language you like, that produces different behavior depending on whether pass-by-reference or pass-by-value-result is used in its parameter passing.
The Problem: Your program has detected an internal problem that needsdebugging. But the program is not being debugged. How do you let theprogrammer at the problem?
Help Me With C Programming
On their way down the river, Jojo and Lili saw two frogs in X1 and X2 respectively. The two frogs are seen jumping up and down happily in the same direction, which is coming to Jojo. After noticing the two frogs, Jojo and Lili noticed that the speed of the two frogs was different. The first frog to start jumping from the X1 position has a speed of V1, while the second frog that starts jumping from the X2 position has a V2 speed. Jojo guessed that the "YES" of the two frogs would be in the same position in a given T time, while Bibi guessed the "NO" of the two frogs would never be in the same position in that time. Help Jojo and Lili take into account the frog's movements to determine if their guess is correct.
Format Input The first line of input consists of a series of integers namely X1, V1, X2, V2, T. X1 and V1 are the starting positions and jumping speeds per second of the first frog. X2 and V2 are the starting positions and jumping speeds per second…
Chapter 1 Solutions
Problem Solving with C++ (9th Edition)
Ch. 1.1 - Prob. 1STECh. 1.1 - What would be the data for a program to add two...Ch. 1.1 - Prob. 3STECh. 1.1 - What is the difference between a machine-language...Ch. 1.1 - What is the role of a compiler?Ch. 1.1 - What is a source program? What is an object...Ch. 1.1 - What is an operating system?Ch. 1.1 - What purpose does the operating system serve?Ch. 1.1 - Prob. 9STECh. 1.1 - Prob. 10STE
Ch. 1.1 - Prob. 11STECh. 1.2 - An algorithm is approximately the same thing as a...Ch. 1.2 - Prob. 13STECh. 1.2 - Prob. 14STECh. 1.2 - Prob. 15STECh. 1.3 - If the following statement were used in a C++...Ch. 1.3 - What is the meaning of \n as used in the following...Ch. 1.3 - What is the meaning of the following statement...Ch. 1.3 - What is the meaning of the following statement...Ch. 1.3 - What is the meaning of this directive? # include...Ch. 1.3 - What, if anything, is wrong with the following...Ch. 1.4 - Prob. 22STECh. 1.4 - Prob. 23STECh. 1.4 - If you omit a punctuation symbol (such as a...Ch. 1.4 - Omitting the final brace } from a program produces...Ch. 1.4 - Prob. 26STECh. 1.4 - Suppose you write a program that is supposed to...Ch. 1 - Using your text editor, enter (that is, type in)...Ch. 1 - Modify the C++ program you entered in Practice...Ch. 1 - Further modify the C++ program that you already...Ch. 1 - Modify the C++ program that you entered in...Ch. 1 - Modify the C++ program that you entered in...Ch. 1 - Prob. 6PCh. 1 - Write a C++ program that reads in two integers and...Ch. 1 - Write a program that prints out C S ! in large...Ch. 1 - Write a program that allows the user to enter a...Ch. 1 - Write a program that allows the user to enter a...Ch. 1 - Write a program that inputs a character from the...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Computer Science Practice Task : Write a program in phyton language . Implement Water Jug Problem using DFS in Python, initial stage (0,0) and final stage (2,Y). A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3- gallon one, a pump which has unlimited water which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring markings on it. How can you get exactly 2 gallons of water in the 4-gallon jug?arrow_forwardThe parameters that are declared elsewhere but visible in the subprogram are called …… Global variables Local variables Nonlocal variables Visible variables Thank you.arrow_forwardA new language with a block structured syntax similar to Algol 60 uses either pass-by-reference or pass-by-value as a parameter passing mechanism, but you don’t know which. Design a test program you can use to find out which parameter passing method it uses and explain how the results of your program will enable you to detect the parameter passing mechanism.arrow_forward
- Write a program in C++ to help Buddy (the sheepdog) calculate the average age of all his sheep. Theprogram will accept as many ages as Buddy needs to input. The program should help Buddyminimize input errors by error-checking the age for him (everybody knows the maximum age forcartoon sheep is 9 years old). When Buddy’s sheep start to get old, he needs to breed moresheep. So, the code should also let Buddy know if the average age indicates if his sheep are aging,young, or middle-aged based on the chart below: average Sheep Age Population is… <= 3 Young 4 - 6 Middle-aged > 6 Agingarrow_forwardIs it possible to talk about the compiler's testability?arrow_forwardWrite algorithms to solve the problems given in each exercise. Note that you are NOT writing C++ code for this assignment. Please do not submit any code. Tom and Jerry opened a new lawn service. They provide three types of services: mowing, fertilizing, and planting trees. The cost of mowing is $35.00 per 5,000 square yards, fertilizing is $30.00 per application, and planting a tree is $50.00. Write an algorithm that prompts the user to enter the area of the lawn, the number of fertilizing applications, and the number of trees to be planted. The algorithm then determines the billing amount. (Assume that the user orders all three services.)arrow_forward
- Could you please provide me with a list of the actions that need to be taken in order to carry out an evaluation of the software's structure?arrow_forwardJack is the head of his section. He looked tensed due to some reason. One of his friends asks him the reason. He says that he has to find the average marks out of 50 of 7 subjects because his section mentor has given him this task. But he does not know how to do this. Then his friend said that he will give him a program in C for finding the average marks of students. So, write this program in C.arrow_forwardC++arrow_forward
- Write a C++ program oop asks about how are you ? (happy, sad, moderate). if you are happy - it will tell you (I wish that you that this continue and I hope that you will always be better.). if you are sad he will tell you (Reduce everything will be fine I hope to be with you to help you) But if you are moderate he will tell you (I expect you have something you think to do just do it , you are great) using a file stream, friend function, operates overloading , inheritance and vectorarrow_forwardPlease help in guiding me in the necessary steps i should take when tackling this assignment, there is a main.cpp given Objective: The main objective of this assignment is to assess students’ ability to apply the stepwise refinement process to develop a new algorithm and carry that through to the implementation of the program. Implementation must follow the top-down design approach, where the solution starts by describing the general functionality of a game. Next, more details are provided in successive steps to refine the implementation. Problem Description: Assume you are hired by a game developing company to write a new computer game for kids. This company has decided to create a version of tricky triangles with a few different rules hoping that this new game will be more entertaining. If you are unfamiliar with the original game of tricky triangle, please learn how to play. This modified version of tricky triangles that you required to create is very much like the original game.…arrow_forwardInvestigate the process of analysing the programming structure thoroughly, and back up your results with relevant examples.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT