Welcome to UE Central Library

Keep Smiling

Programming and problem solving with C++ (Record no. 806)

MARC details
000 -LEADER
fixed length control field 20218cam a22002294a 4500
001 - CONTROL NUMBER
control field 2083
005 - DATE AND TIME OF LATEST TRANSACTION
control field 20200821102543.0
008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION
fixed length control field 040218s2005 maua 001 0 eng
020 ## - INTERNATIONAL STANDARD BOOK NUMBER
International Standard Book Number 0763707988 (pbk.)
040 ## - CATALOGING SOURCE
Transcribing agency DLC
082 00 - DEWEY DECIMAL CLASSIFICATION NUMBER
Classification number 005.133
Edition number 22
Item number D1391
100 1# - MAIN ENTRY--PERSONAL NAME
Personal name Dale, Nell
245 10 - TITLE STATEMENT
Title Programming and problem solving with C++
Statement of responsibility, etc / Nell Dale, Chip Weems.
250 ## - EDITION STATEMENT
Edition statement 4th ed.
260 ## - PUBLICATION, DISTRIBUTION, ETC. (IMPRINT)
Place of publication, distribution, etc Boston :
Name of publisher, distributor, etc Jones and Bartlett Publishers,
Date of publication, distribution, etc 2005
300 ## - PHYSICAL DESCRIPTION
Extent xxvii, 1119 p.
Other physical details ill. ;
Dimensions 24 cm.
500 ## - GENERAL NOTE
General note Includes index.
650 #0 - SUBJECT ADDED ENTRY--TOPICAL TERM
Topical term or geographic name as entry element C++ (Computer program language)
700 1# - ADDED ENTRY--PERSONAL NAME
Personal name Weems, Chip.
942 ## - ADDED ENTRY ELEMENTS (KOHA)
Koha item type Books
505 0# - FORMATTED CONTENTS NOTE
Formatted contents note 1. Preface v<br/>2. 1 overview of programming and problem solving 1<br/>1.1 Overview of programming 2<br/>3. What is programming? 2<br/>4. How do we write a program? 3<br/>1.2 What is a programming language? 9<br/>1.3 What is a computer? 15<br/>1.4 Ethics and responsibilities in the computing profession 24<br/>5. Software piracy 24<br/>6. Privacy of data 25<br/>7. Use of computer resources 26<br/>8. Software engineering 27<br/>1.5 Problem-solving techniques 27<br/>9. Ask questions 28<br/>10. Look for things that are familiar 28<br/>11. Solve by analogy 28<br/>12. Means-ends analysis 29<br/>13. Divide and conquer 30<br/>14. Dalephattoc 11/4/01 2:34 pm page xiii<br/>15. The building-block approach 30<br/>16. Merging solutions 31<br/>17. Mental blocks: the fear of starting 32<br/>18. Algorithmic problem solving 33<br/>19. Problem-solving case study: an algorithm for an employee<br/>20. Paycheck 33<br/>21. Summary 37<br/>22. Quick check 38<br/>23. Answers 39<br/>24. Exam preparation exercises 39<br/>25. Programming warm-up exercises 41<br/>26. Case study follow-up 41<br/>2 C++ syntax and semantics, and the program development<br/>27. Process 43<br/>2.1 The elements of c++ programs 44<br/>28. C++ program structure 44<br/>29. Syntax and semantics 46<br/>30. Syntax templates 49<br/>31. Naming program elements: identifiers 52<br/>32. Data and data types 53<br/>33. Naming elements: declarations 56<br/>34. Taking action: executable statements 61<br/>35. Beyond minimalism: adding comments to a program 66<br/>2.2 Program construction 67<br/>36. Blocks (compound statements) 69<br/>37. The c++ preprocessor 71<br/>38. An introduction to namespaces 73<br/>2.3 More about output 74<br/>39. Creating blank lines 74<br/>40. Inserting blanks within a line 75<br/>2.4 Program entry, correction, and execution 76<br/>41. Entering a program 76<br/>42. Compiling and running a program 77<br/>43. Finishing up 78<br/>44. Problem-solving case study: contest letter 79<br/>45. Xiv | contents<br/>46. Dalephattoc 11/4/01 2:34 pm page xiv<br/>47. Testing and debugging 83<br/>48. Summary 84<br/>49. Quick check 85<br/>50. Answers 87<br/>51. Exam preparation exercises 88<br/>52. Programming warm-up exercises 90<br/>53. Programming problems 92<br/>54. Case study follow-up 94<br/>3 Numeric types, expressions, and output 95<br/>3.1 Overview of c++ data types 96<br/>3.2 Numeric data types 97<br/>55. Integral types 97<br/>56. Floating-point types 98<br/>3.3 Declarations for numeric types 99<br/>57. Named constant declarations 99<br/>58. Variable declarations 100<br/>3.4 Simple arithmetic expressions 101<br/>59. Arithmetic operators 101<br/>60. Increment and decrement operators 104<br/>3.5 Compound arithmetic expressions 105<br/>61. Precedence rules 105<br/>62. Type coercion and type casting 106<br/>3.6 Function calls and library functions 111<br/>63. Value-returning functions 111<br/>64. Library functions 113<br/>65. Void functions 114<br/>3.7 Formatting the output 115<br/>66. Integers and strings 115<br/>67. Floating-point numbers 118<br/>3.8 Additional string operations 122<br/>68. The length and size functions 122<br/>69. The find function 124<br/>70. The substr function 125<br/>71. Problem-solving case study: painting traffic cones 128<br/>72. Contents | xv<br/>73. Dalephattoc 11/4/01 2:34 pm page xv<br/>74. Testing and debugging 132<br/>75. Summary 133<br/>76. Quick check 133<br/>77. Answers 135<br/>78. Exam preparation exercises 136<br/>79. Programming warm-up exercises 140<br/>80. Programming problems 143<br/>81. Case study follow-up 145<br/>4 Program input and the software design process 147<br/>4.1 Getting data into programs 148<br/>82. Input streams and the extraction operator (>>) 149<br/>83. The reading marker and the newline character 152<br/>84. Reading character data with the get function 153<br/>85. Skipping characters with the ignore function 156<br/>86. Reading string data 157<br/>4.2 Interactive input/output 158<br/>4.3 Noninteractive input/output 160<br/>4.4 File input and output 161<br/>87. Files 161<br/>88. Using files 162<br/>89. An example program using files 165<br/>90. Run-time input of file names 167<br/>4.5 Input failure 168<br/>4.6 Software design methodologies 170<br/>4.7 What are objects? 171<br/>4.8 Object-oriented design 173<br/>4.9 Functional decomposition 174<br/>91. Modules 176<br/>92. Implementing the design 177<br/>93. A perspective on design 181<br/>94. Problem-solving case study: stretching a canvas 183<br/>95. Testing and debugging 189<br/>96. Testing and debugging hints 191<br/>97. Xvi | contents<br/>98. Dalephattoc 11/4/01 2:34 pm page xvi<br/>99. Summary 191<br/>100. Quick check 192<br/>101. Answers 193<br/>102. Exam preparation exercises 193<br/>103. Programming warm-up exercises 196<br/>104. Programming problems 198<br/>105. Case study follow-up 199<br/>5 Conditions, logical expressions, and selection<br/>106. Control structures 201<br/>5.1 Flow of control 202<br/>107. Selection 203<br/>5.2 Conditions and logical expressions 204<br/>108. The bool data type 204<br/>109. Logical expressions 205<br/>110. Precedence of operators 214<br/>111. Relational operators with floating-point types 216<br/>5.3 The if statement 217<br/>112. The if-then-else form 217<br/>113. Blocks (compound statements) 220<br/>114. The if-then form 222<br/>115. A common mistake 224<br/>5.4 Nested if statements 224<br/>116. The dangling else 228<br/>5.5 Testing the state of an i/o stream 229<br/>117. Problem-solving case study: warning notices 231<br/>118. Testing and debugging 236<br/>119. Testing in the problem-solving phase: the algorithm<br/>120. Walk-through 236<br/>121. Testing in the implementation phase 239<br/>122. The test plan 244<br/>123. Tests performed automatically during compilation and execution<br/>124. 246<br/>125. Testing and debugging hints 247<br/>126. Contents | xvii<br/>127. Dalephattoc 11/4/01 2:34 pm page xvii<br/>128. Summary 249<br/>129. Quick check 249<br/>130. Answers 250<br/>131. Exam preparation exercises 250<br/>132. Programming warm-up exercises 254<br/>133. Programming problems 256<br/>134. Case study follow-up 259<br/>6 Looping 261<br/>6.1 The while statement 262<br/>6.2 Phases of loop execution 264<br/>6.3 Loops using the while statement 265<br/>135. Count-controlled loops 265<br/>136. Event-controlled loops 267<br/>137. Looping subtasks 273<br/>6.4 How to design loops 276<br/>138. Designing the flow of control 277<br/>139. Designing the process within the loop 278<br/>140. The loop exit 279<br/>6.5 Nested logic 280<br/>141. Designing nested loops 284<br/>142. Problem-solving case study: average income by gender 291<br/>143. Testing and debugging 297<br/>144. Loop-testing strategy 297<br/>145. Test plans involving loops 297<br/>146. Testing and debugging hints 299<br/>147. Summary 300<br/>148. Quick check 301<br/>149. Answers 301<br/>150. Exam preparation exercises 302<br/>151. Programming warm-up exercises 305<br/>152. Programming problems 305<br/>153. Case study follow-up 308<br/>154. Xviii | contents<br/>155. Dalephattoc 11/4/01 2:34 pm page xviii<br/>7 Functions 309<br/>7.1 Functional decomposition with void functions 310<br/>156. When to use functions 311<br/>157. Writing modules as void functions 311<br/>7.2 An overview of user-defined functions 316<br/>158. Flow of control in function calls 316<br/>159. Function parameters 316<br/>7.3 Syntax and semantics of void functions 319<br/>160. Function call (invocation) 319<br/>161. Function declarations and definitions 320<br/>162. Local variables 322<br/>163. The return statement 324<br/>164. Header files 325<br/>7.4 Parameters 326<br/>165. Value parameters 327<br/>166. Reference parameters 328<br/>167. An analogy 331<br/>168. Matching arguments with parameters 332<br/>7.5 Designing functions 335<br/>169. Writing assertions as program comments 337<br/>170. Documenting the direction of data flow 339<br/>171. Problem-solving case study: comparison of<br/>172. Furniture-store sales 343<br/>173. Testing and debugging 352<br/>174. The assert library function 353<br/>175. Testing and debugging hints 354<br/>176. Summary 355<br/>177. Quick check 356<br/>178. Answers 357<br/>179. Exam preparation exercises 357<br/>180. Programming warm-up exercises 363<br/>181. Programming problems 365<br/>182. Case study follow-up 369<br/>183. Contents | xix<br/>184. Dalephattoc 11/4/01 2:34 pm page xix<br/>8 Scope, lifetime, and more on functions 371<br/>8.1 Scope of identifiers 372<br/>185. Scope rules 374<br/>186. Variable declarations and definitions 378<br/>187. Namespaces 379<br/>8.2 Lifetime of a variable 382<br/>188. Initializations in declarations 382<br/>8.3 Interface design 384<br/>189. Side effects 384<br/>190. Global constants 387<br/>8.4 Value-returning functions 389<br/>191. Boolean functions 394<br/>192. Interface design and side effects 398<br/>193. When to use value-returning functions 399<br/>194. Problem-solving case study: reformat dates 401<br/>195. Problem-solving case study: starship weight<br/>196. And balance 412<br/>197. Testing and debugging 423<br/>198. Stubs and drivers 423<br/>199. Testing and debugging hints 425<br/>200. Summary 426<br/>201. Quick check 427<br/>202. Answers 428<br/>203. Exam preparation exercises 428<br/>204. Programming warm-up exercises 432<br/>205. Programming problems 433<br/>206. Case study follow-up 435<br/>9 Additional control structures 437<br/>9.1 The switch statement 438<br/>9.2 The do-while statement 443<br/>9.3 The for statement 446<br/>9.4 The break and continue statements 450<br/>9.5 Guidelines for choosing a looping statement 453<br/>207. Problem-solving case study: monthly rainfall averages 454<br/>208. Xx | contents<br/>209. Dalephattoc 11/4/01 2:34 pm page xx<br/>210. Testing and debugging 459<br/>211. Testing and debugging hints 460<br/>212. Summary 460<br/>213. Quick check 461<br/>214. Answers 461<br/>215. Exam preparation exercises 462<br/>216. Programming warm-up exercises 463<br/>217. Programming problems 465<br/>218. Case study follow-up 467<br/>10 Simple data types: built-in and user-defined 469<br/>10.1 Built-in simple types 470<br/>219. Integral types 472<br/>220. Floating-point types 475<br/>10.2 Additional c++ operators 476<br/>221. Assignment operators and assignment expressions 478<br/>222. Increment and decrement operators 479<br/>223. Bitwise operators 480<br/>224. The cast operation 480<br/>225. The sizeof operator 481<br/>226. The ?: operator 481<br/>227. Operator precedence 482<br/>10.3 Working with character data 484<br/>228. Character sets 485<br/>229. C++ char constants 487<br/>230. Programming techniques 488<br/>10.4 More on floating-point numbers 495<br/>231. Representation of floating-point numbers 495<br/>232. Arithmetic with floating-point numbers 498<br/>233. Implementation of floating-point numbers in the computer 499<br/>10.5 User-defined simple types 505<br/>234. The typedef statement 506<br/>235. Enumeration types 506<br/>236. Named and anonymous data types 513<br/>237. User-written header files 514<br/>238. Contents | xxi<br/>239. Dalephattoc 11/4/01 2:34 pm page xxi<br/>10.6 More on type coercion 515<br/>240. Type coercion in arithmetic and relational expressions 516<br/>241. Type coercion in assignments, argument passing, and return of a<br/>242. Function value 517<br/>243. Problem-solving case study: finding the area under<br/>244. A curve 519<br/>245. Problem-solving case study: rock, paper, scissors 527<br/>246. Testing and debugging 536<br/>247. Floating-point data 536<br/>248. Coping with input errors 536<br/>249. Testing and debugging hints 537<br/>250. Summary 539<br/>251. Quick check 539<br/>252. Answers 540<br/>253. Exam preparation exercises 540<br/>254. Programming warm-up exercises 543<br/>255. Programming problems 544<br/>256. Case study follow-up 545<br/>11 Structured types, data abstraction, and classes 547<br/>11.1 Simple versus structured data types 548<br/>11.2 Records (c++ structs) 549<br/>257. Accessing individual components 551<br/>258. Aggregate operations on structs 553<br/>259. More about struct declarations 554<br/>260. Hierarchical records 555<br/>11.3 Unions 557<br/>11.4 Data abstraction 559<br/>11.5 Abstract data types 561<br/>11.6 C++ classes 564<br/>261. Classes, class objects, and class members 568<br/>262. Built-in operations on class objects 569<br/>263. Class scope 571<br/>264. Information hiding 571<br/>11.7 Specification and implementation files 573<br/>265. The specification file 573<br/>266. Xxii | contents<br/>267. Dalephattoc 11/4/01 2:34 pm page xxii<br/>268. The implementation file 575<br/>269. Compiling and linking a multifile program 580<br/>11.8 Guaranteed initialization with class constructors 582<br/>270. Invoking a constructor 584<br/>271. Revised specification and implementation files<br/>272. For timetype 585<br/>273. Guidelines for using class constructors 588<br/>274. Problem-solving case study: manipulating dates 590<br/>275. Problem-solving case study: birthday calls 602<br/>276. Testing and debugging 610<br/>277. Testing and debugging hints 614<br/>278. Summary 615<br/>279. Quick check 615<br/>280. Answers 617<br/>281. Exam preparation exercises 619<br/>282. Programming warm-up exercises 622<br/>283. Programming problems 624<br/>284. Case study follow-up 628<br/>12 Arrays 631<br/>12.1 One-dimensional arrays 632<br/>285. Declaring arrays 634<br/>286. Accessing individual components 635<br/>287. Out-of-bounds array indexes 638<br/>288. Initializing arrays in declarations 638<br/>289. (lack of) aggregate array operations 639<br/>290. Examples of declaring and accessing arrays 640<br/>291. Passing arrays as arguments 645<br/>292. Assertions about arrays 648<br/>293. Using typedef with arrays 648<br/>12.2 Arrays of records and class objects 649<br/>294. Arrays of records 649<br/>295. Arrays of class objects 651<br/>12.3 Special kinds of array processing 652<br/>296. Subarray processing 652<br/>297. Indexes with semantic content 652<br/>298. Contents | xxiii<br/>299. Dalephattoc 11/4/01 2:35 pm page xxiii<br/>12.4 Two-dimensional arrays 653<br/>12.5 Processing two-dimensional arrays 656<br/>300. Sum the rows 657<br/>301. Sum the columns 659<br/>302. Initialize the array 660<br/>303. Print the array 661<br/>12.6 Passing two-dimensional arrays as arguments 662<br/>12.7 Another way of defining two-dimensional arrays 664<br/>12.8 Multidimensional arrays 666<br/>304. Problem-solving case study: comparison of two lists 669<br/>305. Problem-solving case study: city council election 675<br/>306. Testing and debugging 685<br/>307. One-dimensional arrays 685<br/>308. Complex structures 686<br/>309. Multidimensional arrays 687<br/>310. Testing and debugging hints 688<br/>311. Summary 689<br/>312. Quick check 689<br/>313. Answers 691<br/>314. Exam preparation exercises 692<br/>315. Programming warm-up exercises 698<br/>316. Programming problems 701<br/>317. Case study follow-up 705<br/>13 Array-based lists 707<br/>13.1 The list as an abstract data type 708<br/>13.2 Unsorted lists 713<br/>318. Basic operations 713<br/>319. Insertion and deletion 716<br/>320. Sequential search 718<br/>321. Sorting 721<br/>13.3 Sorted lists 724<br/>322. Basic operations 726<br/>323. Insertion 727<br/>324. Sequential search 730<br/>325. Binary search 730<br/>326. Deletion 736<br/>327. Xxiv | contents<br/>328. Dalephattoc 11/4/01 2:35 pm page xxiv<br/>13.4 Understanding character strings 739<br/>329. Initializing c strings 742<br/>330. C string input and output 743<br/>331. C string library routines 746<br/>332. String class or c strings? 747<br/>333. Problem-solving case study: exam attendance 748<br/>334. Testing and debugging 755<br/>335. Testing and debugging hints 756<br/>336. Summary 757<br/>337. Quick check 757<br/>338. Answers 758<br/>339. Exam preparation exercises 758<br/>340. Programming warm-up exercises 761<br/>341. Programming problems 762<br/>342. Case study follow-up 763<br/>14 Object-oriented software development 765<br/>14.1 Object-oriented programming 766<br/>14.2 Objects 768<br/>14.3 Inheritance 769<br/>343. Deriving one class from another 770<br/>344. Specification of the exttime class 774<br/>345. Implementation of the exttime class 776<br/>346. Avoiding multiple inclusion of header files 780<br/>14.4 Composition 781<br/>347. Design of a timecard class 782<br/>348. Implementation of the timecard class 783<br/>14.5 Dynamic binding and virtual functions 785<br/>349. The slicing problem 787<br/>350. Virtual functions 788<br/>14.6 Object-oriented design 790<br/>351. Step 1: identify the objects and operations 790<br/>352. Step 2: determine the relationships among objects 792<br/>353. Step 3: design the driver 792<br/>14.7 Implementing the design 793<br/>354. Problem-solving case study: time card lookup 794<br/>355. Contents | xxv<br/>356. Dalephattoc 11/4/01 2:35 pm page xxv<br/>357. Testing and debugging 814<br/>358. Testing and debugging hints 815<br/>359. Summary 816<br/>360. Quick check 816<br/>361. Answers 818<br/>362. Exam preparation exercises 819<br/>363. Programming warm-up exercises 822<br/>364. Programming problems 823<br/>365. Case study follow-up 824<br/>15 Pointers, dynamic data, and reference types 825<br/>15.1 Pointers 826<br/>366. Pointer variables 826<br/>367. Pointer expressions 831<br/>15.2 Dynamic data 836<br/>15.3 Reference types 842<br/>15.4 Classes and dynamic data 846<br/>368. Class destructors 851<br/>369. Shallow versus deep copying 852<br/>370. Class copy-constructors 854<br/>371. Problem-solving case study: personnel records 857<br/>372. Problem-solving case study: dynamic arrays 872<br/>373. Testing and debugging 882<br/>374. Testing and debugging hints 884<br/>375. Summary 885<br/>376. Quick check 886<br/>377. Answers 887<br/>378. Exam preparation exercises 888<br/>379. Programming warm-up exercises 892<br/>380. Programming problems 893<br/>381. Case study follow-up 894<br/>16 Linked structures 897<br/>16.1 Sequential versus linked structures 898<br/>16.2 Array representation of a linked list 900<br/>382. Xxvi | contents<br/>383. Dalephattoc 11/4/01 2:35 pm page xxvi<br/>16.3 Dynamic data representation of a linked list 902<br/>384. Algorithms on dynamic linked lists 908<br/>385. Pointer expressions 926<br/>386. Classes and dynamic linked lists 927<br/>16.4 Choice of data representation 929<br/>387. Problem-solving case study: simulated playing cards 930<br/>388. Problem-solving case study: solitaire simulation 938<br/>389. Testing and debugging 956<br/>390. Testing and debugging hints 956<br/>391. Summary 956<br/>392. Quick check 957<br/>393. Answers 957<br/>394. Exam preparation exercises 957<br/>395. Programming warm-up exercises 960<br/>396. Programming problems 961<br/>397. Case study follow-up 962<br/>17 Templates and exceptions 963<br/>17.1 Template functions 964<br/>398. Function overloading 964<br/>399. Defining a function template 967<br/>400. Instantiating a function template 968<br/>401. Enhancing the print template 969<br/>402. User-defined specializations 970<br/>403. Organization of program code 971<br/>17.2 Template classes 974<br/>404. Instantiating a class template 976<br/>405. Organization of program code 978<br/>406. A caution 981<br/>17.3 Exceptions 982<br/>407. The throw statement 983<br/>408. The try-catch statement 985<br/>409. Nonlocal exception handlers 988<br/>410. Re-throwing an exception 991<br/>411. Standard exceptions 992<br/>412. Back to the division-by-zero problem 995<br/>413. Contents | xxvii<br/>414. Dalephattoc 11/4/01 2:35 pm page xxvii<br/>415. Problem-solving case study: the sortedlist class revisited 996<br/>416. Testing and debugging 1007<br/>417. Testing and debugging hints 1007<br/>418. Summary 1008<br/>419. Quick check 1009<br/>420. Answers 1010<br/>421. Exam preparation exercises 1011<br/>422. Programming warm-up exercises 1012<br/>423. Programming problems 1014<br/>424. Case study follow-up 1014<br/>18 Recursion 1017<br/>18.1 What is recursion? 1018<br/>18.2 Recursive algorithms with simple variables 1022<br/>18.3 Towers of hanoi 1025<br/>18.4 Recursive algorithms with structured variables 1030<br/>18.5 Recursion using pointer variables 1032<br/>425. Printing a dynamic linked list in reverse order 1032<br/>426. Copying a dynamic linked list 1035<br/>18.6 Recursion or iteration? 1040<br/>427. Problem-solving case study: converting decimal integers to<br/>428. Binary integers 1041<br/>429. Problem-solving case study: minimum value in an<br/>430. Integer array 1044<br/>431. Testing and debugging 1046<br/>432. Testing and debugging hints 1046<br/>433. Summary 1047<br/>434. Quick check 1047<br/>435. Answers 1048<br/>436. Exam preparation exercises 1048<br/>437. Programming warm-up exercises 1050<br/>438. Programming problems 1052<br/>439. Case study follow-up 1053<br/>440. Appendix a reserved words 1055<br/>441. Appendix b operator precedence 1055<br/>442. Xxviii | contents<br/>443. Dalephattoc 11/4/01 2:35 pm page xxviii<br/>444. Appendix c a selection of standard library routines 1057<br/>445. Appendix d using this book with a prestandard version of c++ 1066<br/>446. Appendix e character sets 1071<br/>447. Appendix f program style, formatting, and documentation 1073<br/>448. Glossary 1081<br/>449. Answers to selected exercises 1091<br/>
Holdings
Withdrawn status Damaged status Not for loan Home library Current library Date acquired Source of acquisition Full call number Barcode Date last seen Price effective from Koha item type
      UE-Central Library UE-Central Library 20.06.2018 U.E. 005.133 D1391 T2083 20.06.2018 20.06.2018 Books
Copyright © 2023, University of Education, Lahore. All Rights Reserved.
Email:centrallibrary@ue.edu.pk