starting out with c early objects 10th edition solution manual
starting out with c early objects 10th edition
starting out with c early objects
Livre connecté
Titre de l’ouvrage:
Auteur(s):
Édition:
ISBN:
Édition:
Plus de résumés pour
Complete Solution Manual Starting Out with C++ Early Objects 10th Edition Questions & Answers with rationales
Tout pour ce livre (2)
École, étude et sujet
Solution Manual for Starting Out with Java From
Solution Manual for Starting Out with Java From
Vendeur
S'abonner
NurseGrades
Avis reçus
Aperçu du contenu
Starting Out with C++ Early Objects 10th Edition Solution Manual Starting Out With C++ : Early Objects, Tenth Edition Solutions to End-of-Chapter Review Questions Chapter 1 1. programmed 12. key 2. CPU 13. programmer -defined symbols 3. arithmetic logic unit (ALU) and control unit 14. Opera tors 4. disk drive 15. Punctuation 5. operating systems and application software 16. syntax 6. instructions 17. variable 7. programming 18. defined (or declared) 8. Machine language 19. input, proce ssing, output 9. High -level 20. Input 10. Low -level 21. Output 11. portability 22. hierarchy chart 23. Main memory, or RAM, is volatile, which means its contents are erased when power is removed from the computer. Se condary memory, such as a disk , CD, or flash drive, does not lose its contents when power is removed from the computer. 24. A syntax error is the misuse of a key word, operator, punctuation, or other part of the programming language. A logical error is a m istake that tells the computer to carry out a task incorrectly or to carry out tasks in the wrong order. It causes the program to produce the wrong results. 25. C 26. B 27. D 28. Hierarchy Chart: Calculate Customer's Available Credit Get Inputs Read Credit Used Read Max Credit Calculate and display Available Credit (Max Credit – Credit U sed) 29. Account Balance High Level Pseudocode Have user input starting balance Have user input total deposits Have user input total withdrawals Calculate current balance Display current balance Account Balance Detailed Pseudocode Input startBalance // with prompt Input totalDeposits // with prompt Input totalWithdrawals // with prompt currentBalance = startBalance + totalDeposits - totalWithdrawals Display currentBalance 30. Sales Tax High Level Pseudocode Have user input retail price Have user input sales tax rate Calculate tax amount Calculate sales total Display tax amount and sales total Sales Tax Detailed Pseudocode Input retailPrice // with prompt Input salesTaxRate // with prompt taxAmount = retailPrice * salesTaxRate salesTotal = retailPri ce + taxAmount Display taxAmount, salesTotal 31. 45 32. 9 33. 7 34. 28 35. 365 36. Line 3 adds num1 + num1 . It should add num1 + num2 . Line 4 displays avg, but it should display average . The name of the displayed variable must match the na me of the variable holding the answer. 37. The error is that the program performs its math operation before the user has entered values for the variables width and length . 38. Some of the questions that should be asked are: What standard ceiling height should be used, or is this figure to be input? How many square feet should be subtracted out for windows and doors, or do you also want this information input since it could vary by room? Are the ceilings also to be painted , or just the walls? How many squ are feet will 1 gallon of paint cover? How many coats of paint will you use , or should this information be input? Chapter 2 1. semicolon 5. braces {} 2. iostream 6. literals (also sometimes called constants) 3. main 7. 9.7865E14 4. # 8. 1, 2 9. A) valid B) invalid C) valid D) valid 10. A) valid B) valid C) invalid D) invalid 11. All are valid. 12. A) invalid B) invalid C) invalid D) valid 13. A) valid B) invalid C) valid D) valid , but it prints the contents of variable Hello , not the string "Hello". 14. A) valid B) invalid C) valid 15. A) 11 B) 14 C) 3 D) 3.5 16. A) 9.5 B) 14 .0 C) 1.0 D) 1.75 17. double temp, // This can also be done on a single line. weight, height; 18. int months = 2, days, years = 3; 19. A) d2 = d1 + 2; B) d1 = d2 * 4; C) c = 'K'; D) i = 'K'; E) i = i – 1; 20. A) d1 = d2 – 8.5; B) d2 = d.14; C) c = 'F'; D) i = i + 1; E) d2 = d2 + d1; 21. cout << "Two mandolins like creatures in the \n\n\n"; cout << "dark \n\n\n"; cout << "Creating the agony of ecstasy. \n\n\n"; cout << " - George Barker \n\n\n"; 22. cout << "L\n" << "E\n" // This can also be written as a single st ring literal: << "A\n" // cout << "L\nE\nA\nF\n"; << "F\n"; 23. Input weeks // with prompt days = weeks * 7 Display days 24. Input eggs // with prompt cartons = eggs / 12 // perform integer divide Display cartons 25. Input speed // with prompt Input time // with prompt distance = speed * time Display distance 26. Input miles // with prompt Input gallon s // with prompt milesPerGallon = miles / gallons Display milesPerGallon 27. A) 0 B) 8 C) I am the incrediblecomputing 100 2 machine and I will amaze you. 28. A) Be careful! This might/n be a trick question. B) 23 1 29. On line 1 t he comments symbols are backwards. They should be /* */ . On line 2 iostream should be enclosed in angle brackets. On line 5 t here shouldn't be a semicolon after int main() . On lines 6 and 13 t he opening and closing braces of function main are reversed. On line 7 t here should be a semicolon after int a, b, c . In addition, the comment symbol is incorrect. It should be //. On lines 8 -10 each assignm ent statement should end with a semicolon. On line 11 cout begins with a capital letter. In addition, the stream insertion operator s should read << instead of >> and the variable that is ouput should be c instead of capital C. 30. Whatever problem a pai r of students decides to work with they must determine such things as which values will be input vs. which will be set internally in the program, how much precision is required on calculations, what output will be produced by the program, and how it should be displayed. Students must also determine how to handle situations that are not clear cut. In the paint problem many of these considerations are listed in the teacher answer key (Chapter 1, Question 34). In the recipe program students must determine such things as how to handle quantities, like one egg, that cannot be halved. In the driving program, knowing distance and speed are not enough. Agreement should be reached on how to handle delays due to traffic lights and traffic congestion. Should this be a n input value, computed as a percent of overall driving time, or handled some other way?
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur NurseGrades. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €12,69. Vous n'êtes lié à rien après votre achat.