Starting Out with C++: Early Objects (9th Edition)
9th Edition
ISBN: 9780134400242
Author: Tony Gaddis, Judy Walters, Godfrey Muganda
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 1, Problem 28RQE
Sales Tax
Write high-level and detailed pseudocode for a program that calculates the total of a retail sale. The program should ask the user for
- The retail price of the item being purchased
- The sales tax rate
Once these items have been entered, the program should calculate and display the sales tax for the purchase and the total of the sale.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
1. Based on our lecture on NP-Complete, can an NP-Complete problem not have a polynomial-time
algorithm? Explain your answer.
2. Prove the conjecture that if any problem in NP is not polynomial-time solvable, then no NP-Complete
problem is polynomial-time solvable. (You can't use Theorem 1 and 2 directly)
3. After you complete your proof in b), discuss how this conjecture can be used to solve the problem of
whether P=NP.
Based on our lectures and the BELLMAN-FORD algorithm below, answer the following questions.
BELLMAN-FORD (G, w, s)
1
INITIALIZE-SINGLE-SOURCE (G, s)
2 for i = 1 to |G. VI - 1
3
4
5
6
7
8
for each edge (u, v) = G.E
RELAX(u, v, w)
for each edge (u, v) = G.E
if v.d> u.d+w(u, v)
return FALSE
return TRUE
1. What does the algorithm return?
2. Analyze the complexity of the algorithm.
(Short-answer) b. Continue from the previous question. Suppose part of the data you extracted from the data warehouse is the following. Identify the missing values you think exist in the dataset. Use Column letter and Row number to refer to each missing value in the dataset. Please write down how you want to address each particular missing value (you can group them if they receive same treatment). For imputation, you do not need to calculate the exact imputed values but just describe what kind of value you want to use to impute.
Chapter 1 Solutions
Starting Out with C++: Early Objects (9th Edition)
Ch. 1.2 - Why is the computer used by so many different...Ch. 1.2 - List the five major hardware components of a...Ch. 1.2 - Internally, the CPU consists of what two units?Ch. 1.2 - Prob. 1.4CPCh. 1.2 - Prob. 1.5CPCh. 1.2 - Prob. 1.6CPCh. 1.2 - What are the two general categories of software?Ch. 1.2 - Prob. 1.8CPCh. 1.2 - What do you call a program that performs a...Ch. 1.2 - Word processing programs, spreadsheet programs,...
Ch. 1.3 - What is an algorithm?Ch. 1.3 - Why were computer programming languages invented?Ch. 1.3 - Prob. 1.13CPCh. 1.3 - Prob. 1.14CPCh. 1.3 - Prob. 1.15CPCh. 1.3 - Prob. 1.16CPCh. 1.3 - Prob. 1.17CPCh. 1.5 - Describe the difference between a key word and a...Ch. 1.5 - Prob. 1.19CPCh. 1.5 - Prob. 1.20CPCh. 1.5 - Prob. 1.21CPCh. 1.5 - Prob. 1.22CPCh. 1.5 - What must take place in a program before a...Ch. 1.5 - Prob. 1.24CPCh. 1.6 - What four items should you identify when defining...Ch. 1.6 - Prob. 1.26CPCh. 1.6 - Prob. 1.27CPCh. 1.6 - What is pseudocode?Ch. 1.6 - What is the difference between high-level...Ch. 1.6 - Describe what a compiler does with a programs...Ch. 1.6 - Prob. 1.31CPCh. 1.6 - Prob. 1.32CPCh. 1.6 - Prob. 1.33CPCh. 1 - Computers can do many different jobs because they...Ch. 1 - The job of the _____ is to fetch instructions,...Ch. 1 - Internally, the CPU consists of the _____ and the...Ch. 1 - Prob. 4RQECh. 1 - The two general categories of software are _____...Ch. 1 - Prob. 6RQECh. 1 - Since computers cant be programmed in natural...Ch. 1 - _____is the only language computers really...Ch. 1 - Prob. 9RQECh. 1 - Prob. 10RQECh. 1 - A programs ability to run on several different...Ch. 1 - Words that have special meaning in a programming...Ch. 1 - Prob. 13RQECh. 1 - _____ are characters or symbols that perform...Ch. 1 - _____ characters or symbols mark the beginning or...Ch. 1 - Prob. 16RQECh. 1 - A(n) _____ is a named storage location.Ch. 1 - A variable must be _____ before it can be used in...Ch. 1 - The three primary activities of a program are...Ch. 1 - _____ is information a program gathers from the...Ch. 1 - _____ is information a program sends to the...Ch. 1 - A(n) _____ is a diagram that graphically...Ch. 1 - Prob. 23RQECh. 1 - What is the difference between system software and...Ch. 1 - Prob. 25RQECh. 1 - Prob. 26RQECh. 1 - Account Balance Write high-level and detailed...Ch. 1 - Sales Tax Write high-level and detailed pseudocode...Ch. 1 - The variable sum starts with the value 0. Add 10...Ch. 1 - The variable x starts with the value 0. The...Ch. 1 - The variable j starts with the value 10. The...Ch. 1 - The variable a starts with the value 1. The...Ch. 1 - Find the Error 33. The following pseudocode...Ch. 1 - Suppose one of your friends, who paints the...Ch. 1 - Candy Bar Sales Using Program 1-1 as an example,...Ch. 1 - Baseball Costs Using Program 1-1 as an example,...Ch. 1 - Flower Garden Write a program that calculates how...
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
- Please original work Locate data warehousing solutions offered by IBM, Oracle, Microsoft, and Amazon Compare and contrast the capabilities of each solution and provide several names of some organizations that utilize each of these solutions. Please cite in text references and add weblinksarrow_forwardNeed Help: Which of the following statements about confusion matrix is wrong A) Confusion matrix is a performance measure for probability prediction techniques B) Confusion matrix is derived based on classification rules with cut-off value 0.5 C) Confusion matrix is derived based on training partition to measure a model’s predictive performance D) None of the abovearrow_forwardI have a few questions I need help with Statement: When we build a nearest neighbor model, we shall not remove the redundant dummies when coding a categorical variable. True or False Statement: One reason why a neural network model often requires a significant number of data observations to train is that it often has a significant number of model parameters to estimate even if there are only a few predictors. True or False. Which of the following statements about confusion matrix is wrong A) Confusion matrix is a performance measure for probability prediction techniques B) Confusion matrix is derived based on classification rules with cut-off value 0.5 C) Confusion matrix is derived based on training partition to measure a model’s predictive performance D) None of the abovearrow_forward
- Student ID is 24241357arrow_forwardWhich of the following methods help when a model suffers from high variance? a. Increase training data. b. Increase model size. c. Decrease the amount of regularization. d. Perform feature selection.arrow_forward57 Formula 1 point Use shift folding, length 3, on the following value to calculate the Hash Value. 114184121 Type your answer...arrow_forward
- Write a program that reads a list of 10 integers, and outputs those integers in reverse. For coding simplicity, follow each output integer by a space, including the last one. Then, output a newline. Ex: If the input is: 2 4 6 8 10 12 14 16 18 20 the output is: 20 18 16 14 12 10 8 642 To achieve the above result, first read the integers into an array. Then output the array in reverse. 623802 1031906 nx3zmv7.arrow_forward6.3B-2. Multiple Access protocols (2). Consider the figure below, which shows the arrival of 6 messages for transmission at different multiple access nodes at times t=0.1, 0.8, 1.35, 2.6, 3.9, 4.2. Each transmission requires exactly one time unit. 1 2 3 4 t=0.0 t=1.0 t=2.0 t=3.0 5 6 t=4.0 t=5.0 For the slotted ALOHA protocol, indicate which packets are successfully transmitted. You can assume that if a packet experiences a collision, a node will not attempt a retransmission of that packet until sometime after t=5. 1 2 3 4 5 Karrow_forwardProblem of checking Compile errors Runtime errors ======== } ng; } You have the following IQueue interface. Implement a Queue class derived from IQueue. You can use STL containers discussed in class, such as vector, queue, stack, deque, map. #include using namespace std; class IQueue { public: }; virtual void Enqueue(int val) virtual int Dequeue() = 0; virtual int Size() const = 0; int main() = 0; { Queue q; ===== } cout << q.Size() << endl; q. Enqueue(10); q.Enqueue(20); q. Enqueue(30); cout << q.Size() << endl; cout << q.Dequeue() << endl; cout << q.Size() << endl; cout << q.Dequeue() << endl; cout << q.Size() << endl; cout << q.Dequeue() << endl; cout << q.Size() << endl; ==== ====arrow_forward
- logicarrow_forwardQ1: For the Figure Below if the input to the first tank is step with magnitude 2 find 1. What type of relation between (tanks 1 and 2) and tank 3 2. Initial real value of H2, if the steady state value is 10 3. Final Value of H3 4. H1 at t=1.5 5. For the system tank1 and tank 2 only which case is applied to them (overdamping, underdamped or critically damping) A₁=1 A₂=1 Tank 1 R₁ = 2 * Tank 2 R₁₂=2 A3=0.5 hy R₁=4 Tank 3arrow_forwardPlease original work Talk about the most common challenges encountered in a data warehouse What are some creative ways to overcome those challenges What is for one real world example where your method would be effective Please cite in text references and add weblinksarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Expressions in C++ | C++ tutorial for beginners; Author: Tutorial Mart;https://www.youtube.com/watch?v=XHbsZGpmRc8;License: Standard YouTube License, CC-BY
expression in python # python expressions; Author: Abhishek Tripathi;https://www.youtube.com/watch?v=Cc-kJGRjH6k;License: Standard Youtube License