معرفی کتاب «C[plus plus] by dissection» نوشتهٔ Ira Pohl, Charlie McDowell در سال 2002. این کتاب در 97 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «C[plus plus] by dissection» در دستهٔ بدون دستهبندی قرار دارد.
C++ by Dissection presents a thorough introduction to the programming process by carefully developing working programs to illuminate key features of the C++ programming language. This book presents the concepts of the programming process using the "dissection" method, the hallmark feature that has made Ira Pohl's C and Java books of the "By Dissection" series so popular. Dissection is a unique pedagogical tool first developed by the author to point out key features of program code. It is similar to a structured walk-through of the code, with the intention of explaining newly encountered programming elements and idioms as found in working code. The book includes a CD-ROM containing a compiler and an electronic version of the book that allows readers to search, take notes, and highlight right on their computer. Each chapter presents a number of carefully explained programs, which lead the reader in a holistic manner to ever-improving programming skills. Right from the start, the reader is introduced to complete programs, and at an early point in the book, the reader is introduced to writing functions as a major feature of structured programming. It contains four to seven small code dissections per chapter, and then each chapter culminates with a larger, extended code dissection. "Software Engineering" sections in each chapter reinforce sound software engineering skills. The book assumes no programming background and can be used by first-time computer users or by experienced programmers who are transitioning to C++. Preface 6 Dissections 7 No Background Assumed 7 Special Features 8 Chapter Features 8 Classroom Usage 9 Interactive Environment 10 Professional Use 10 Supplements 10 Acknowledgments 11 Table of Contents 12 A First Program 22 Problem Solving: Recipes 26 1.2.1 Algorithms—Being Precise 27 Implementing Our Algorithm in C++ 29 Software Engineering: Style 31 Common Programming Errors 32 Writing and Running a C++ Program 33 1.6.1 Interrupting a Program 35 1.6.2 Typing an End-of-File Signal 35 Dr. P’s Prescriptions 35 C++ Compared with Java 36 Summary 39 Review Questions 40 Exercises 41 Writing an ANSI C++ Program 20 Getting Ready to Program 21 Program Elements 45 2.1.1 Comments 45 2.1.2 Keywords 46 2.1.3 Identifiers 46 2.1.4 Literals 48 2.1.5 Operators and Punctuators 50 Input/Output 50 Program Structure 53 2.3.1 Redirection 55 Simple Types 56 2.4.1 Initialization 58 The Traditional Conversions 59 Enumeration Types 62 2.6.1 typedef Declarations 63 Expressions 63 2.7.1 Precedence and Associativity of Operators 64 2.7.2 Relational, Equality, and Logical Operators 66 Statements 69 2.8.1 Assignment and Expressions 70 2.8.2 The Compound Statement 71 2.8.3 The if and if-else Statements 71 2.8.4 The while Statement 74 2.8.5 The for Statement 75 2.8.6 The do Statement 76 2.8.7 The break and continue Statements 77 2.8.8 The switch Statement 78 2.8.9 The goto Statement 81 Software Engineering: Debugging 81 Dr. P’s Prescriptions 84 C++ Compared with Java 86 Summary 88 Review Questions 89 Exercises 90 Native Types and Statements 44 Functions, Pointers, and Arrays 94 Functions 94 Function Invocation 95 Function Definition 97 The return Statement 98 Function Prototypes 99 Call-By-Value 100 Recursion 102 Default Arguments 103 Functions as Arguments 105 Overloading Functions 107 Inlining 108 3.11.1 Software Engineering: Avoiding Macros 108 Scope and Storage Class 109 3.12.1 The Storage Class auto 111 3.12.2 The Storage Class extern 111 3.12.3 The Storage Class register 112 3.12.4 The Storage Class static 113 3.12.5 Header Files and Linkage Mysteries 114 Namespaces 117 Pointer Types 118 3.14.1 Addressing and Dereferencing 119 3.14.2 Pointer-Based Call-By-Reference 119 Reference Declarations 121 The Uses of void 123 Arrays 124 3.17.1 Subscripting 125 3.17.2 Initialization 125 Arrays and Pointers 125 Passing Arrays to Functions 126 Problem Solving: Random Numbers 127 Software Engineering: Structured Programming 130 Core Language ADT: char* String 133 Multidimensional Arrays 136 Operators new and delete 139 3.24.1 Vector Instead of Array 142 3.24.2 String Instead of char* 143 Software Engineering: Program Correctness 143 Dr. P’s Prescriptions 146 C++ Compared with Java 147 Summary 149 Review Questions 151 Exercises 152 The Aggregate Type class and struct 159 Member Selection Operator 160 Member Functions 162 Access: Private and Public 165 Classes 166 Class Scope 169 4.6.1 Scope Resolution Operator 169 4.6.2 Nested Classes 171 An Example: Flushing 172 The this Pointer 177 static Members 178 const Members 180 4.10.1 Mutable Members 182 A Container Class Example: ch_stack 183 Software Engineering: Class Design 185 4.12.1 Trade-Offs in Design 187 4.12.2 Unified Modeling Language (UML) and Design 188 Dr. P’s Prescriptions 189 C++ Compared with Java 190 Advanced Topics 191 4.15.1 Pointer to Class Member 191 4.15.2 Unions 193 4.15.3 Bit Fields 194 Summary 196 Review Questions 197 Exercises 198 Classes and Abstract Data Types 158 Classes with Constructors 203 5.1.1 The Default Constructor 205 5.1.2 Constructor Initializer 206 5.1.3 Constructors as Conversions 206 5.1.4 Improving the point Class 208 5.1.5 Constructing a Stack 209 5.1.6 The Copy Constructor 212 Classes with Destructors 214 Members That Are Class Types 214 Example: A Singly Linked List 215 Strings Using Reference Semantics 220 Constructor Issues and Mysteries 223 5.6.1 Destructor Details 224 5.6.2 Constructor Pragmatics 225 Polymorphism Using Function Overloading 225 ADT Conversions 226 Overloading and Signature Matching 227 Friend Functions 230 Overloading Operators 232 Unary Operator Overloading 233 Binary Operator Overloading 236 Overloading the Assignment Operator 238 Overloading the Subscript Operator 239 Overloading Operator () for Indexing 240 Overloading < > 241 Overloading -> 242 Overloading new and delete 243 More Signature Matching 246 Software Engineering: When to Use Overloading 247 Dr. P’s Prescriptions 248 C++ Compared with Java 250 Summary 254 Review Questions 255 Exercises 256 Ctors, Dtors, Conversions, and Operator Overloading 202 Templates and Generic Programming 262 Template Class stack 265 Function Templates 267 6.2.1 Signature Matching and Overloading 269 6.2.2 How to Write a Simple Function: square() 271 Generic Code Development: Quicksort 272 6.3.1 Converting to a Generic quicksort() 275 Class Templates 279 6.4.1 Friends 279 6.4.2 Static Members 279 6.4.3 Class Template Arguments 280 6.4.4 Default Template Arguments 280 6.4.5 Member Templates 281 Parameterizing the Class vector 281 Using STL: string, vector, and complex 284 6.6.1 string and basic_string 284 6.6.2 vector in STL 286 6.6.3 Using complex 286 6.6.4 limits and Other Useful Templates 287 Software Engineering: Reuse and Generics 288 6.7.1 Debugging Template Code 288 6.7.2 Special Considerations 289 6.7.3 Using typename 290 Dr. P’s Prescriptions 291 C++ Compared with Java 291 Summary 295 Review Questions 296 Exercises 297 Standard Template Library 299 A Simple STL Example 299 Containers 302 7.2.1 Sequence Containers 304 7.2.2 Associative Containers 307 7.2.3 Container Adaptors 312 Iterators 315 7.3.1 Iterators for istream and ostream 316 7.3.2 Iterator Adaptors 319 Algorithms 321 7.4.1 Sorting Algorithms 321 7.4.2 Nonmutating Sequence Algorithms 324 7.4.3 Mutating Sequence Algorithms 326 7.4.4 Numerical Algorithms 329 Numerical Integration Made Easy 330 STL: Function Objects 334 7.6.1 Building a Function Object 336 7.6.2 Function Adaptors 337 Allocators 339 Software Engineering: STL Use 339 7.8.1 Syntax Bugs 340 Dr. P’s Prescriptions 341 C++ Compared with Java 342 Summary 343 Review Questions 344 Exercises 345 Inheritance and OOP 347 A Derived Class 348 8.1.1 More Unified Modeling Language (UML) 352 A Student ISA Person 353 Virtual Functions: Dynamic Determination 356 8.3.1 Overloading and Overriding Confusion 359 8.3.2 A Canonical Example: Class shape 361 Abstract Base Classes 362 Templates and Inheritance 369 Multiple Inheritance 370 RTTI and Other Fine Points 372 8.7.1 Finer Points 373 Software Engineering: Inheritance and Design 374 8.8.1 Subtyping Form 375 8.8.2 Code Reuse 376 Dr. P’s Prescriptions 377 C++ Compared with Java 377 Summary 380 Review Questions 381 Exercises 382 Input/Output 385 The Output Class ostream 385 Formatted Output and iomanip 386 User-Defined Types: Output 391 The Input Class istream 393 Files 394 Using Strings as Streams 398 The Functions and Macros in ctype 399 Using Stream States 399 Mixing I/O Libraries 402 Software Engineering: I/O 403 Dr. P’s Prescriptions 405 C++ Compared with Java 405 Summary 408 Review Questions 409 Exercises 410 Exceptions and Program Correctness 413 Using the assert Library 413 C++ Exceptions 416 Throwing Exceptions 417 10.3.1 Rethrown Exceptions 419 10.3.2 Exception Expressions 420 try Blocks 423 Handlers 424 Converting Assertions to Exceptions 424 Exception Specification 427 terminate() and unexpected() 428 Standard Exceptions and Their Uses 428 Software Engineering: Exception Objects 430 Dr. P’s Prescriptions 432 C++ Compared with Java 433 Summary 436 Review Questions 437 Exercises 438 OOP Using C++ 440 OOP Language Requirements 441 11.1.1 ADTs: Encapsulation and Data Hiding 442 11.1.2 Reuse and Inheritance 442 11.1.3 Polymorphism 443 OOP: The Dominant Programming Methodology 444 Designing with OOP in Mind 451 Class-Responsibility-Collaborator 453 11.4.1 CRC Cards 454 Design Patterns 455 A Further Assessment of C++ 456 11.6.1 Why C++ Is Better Than Java 457 11.6.2 A Short Rebuttal 458 Software Engineering: Last Thoughts 458 Dr. P’s Prescriptions 459 C++ Compared with Java 460 Summary 466 Review Questions 467 Exercises 468 ASCII Character Codes 470 Operator Precedence and Associativity 472 String Library 474 Constructors 475 Member Functions 476 Global Operators 479 The tio Library 481 Console 481 FormattedWriter 482 PrintFileWriter 491 ReadException 491 ReadInput 492 Index 501
Now in its fourth edition, A Book on C retains the features that have made it a proven, best-selling tutorial and reference on the ANSI C programming language. This edition builds on the many existing strengths of the text to improve, update, and extend the coverage of C, and now includes information on transitioning to Java and C++ from C.
Beginners and professional programmers alike will benefit from the numerous examples and extensive exercises developed to guide readers through each concept. Step-by-step dissections of program code illuminate the correct usage and syntax of C language constructs and reveal the underlying logic of their application. The clarity of exposition and format of the book make it an excellent reference on all aspects of C.
Highlights of A Book on C, Fourth Edition :
- New and updated programming examples and dissections—the authors' trademark technique for illustrating and teaching language concepts.
- Recursion is emphasized with revised coverage in both the text and exercises.
- Multifile programming is given greater attention, as are the issues of correctness and type safety. Function prototypes are now used throughout the text.
- Abstract Data Types, the key concept necessary to understanding objects, are carefully covered.
- Updated material on transitioning to C++, including coverage of the important concepts of object-oriented programming.
- New coverage is provided on transitioning from C to Java.
- References to key programming functions and C features are provided in convenient tables.
This book reveals the elegant simplicity and power of the C programming language, and describes the ANSI version of it. Beginners and professionals will benefit from its step-by-step dissections of program code, and numerous examples and exercises. The book begins with the benefits of C, and briefly discusses the ANSI C standard, and the migration to C++ and Java. Chapter 1 overviews the C as a language, covering crucial programming techniques. The authors then explain in detail lexical elements, operators, and constants in Chapter 2. Chapters 3 through 10 describe all the features of C, including some advanced features.
Java by Dissection provides a comprehensive, example-based coverage of the Java language, wish an emphasis on programming style and methodology. It assumes no prior programming experience, making it ideal for readers who are starting out in their software development careers as well as for programmers who want to expand their skills.
Teaching "by Dissection"
Java by Dissection stresses working code introducing full working programs from the start.. In each chapter, a program particularly illustrative of the chapter's themes is presented and then analyzed by dissection—Ira Pohl's trademark code-presentation technique that reveals the underlying structure of the programs. This dissection of code helps readers comprehend newly encountered programming elements and idioms.
Traditional and Object-Oriented Programming
Java by Dissection begins by explaining how all the basic data types and control statements are used traditionally, and then progresses to the object-oriented features of the Java language and their importance to program design. This gradual introduction to OOP ensures that novices attain an understanding of programming basics before moving on to Java's object-oriented features.
The second half of Java by Dissection explains in detail much that is sophisticated about Java such as its threading GUI, exception handling and file-manipulation capabilities. With its depth and scope this book is both a carefully structured teaching text an (I a valuable reference in Java Programming.
Enlisting the best-selling "by dissection" method of instruction, this book teaches programming techniques and presents the Java language in a sound and structured manner that is appropriate for both novice and seasoned programmers. It presents a thorough introduction to the programming process by carefully developing working programs to illuminate key features of the Java programming language. Program code is explained in an easy-to-follow manner throughout. This book presents readers with a clear and thorough introduction to the programming process by carefully developing working Java programs, using the method of dissection. A dissection is similar to a structured walk-through of the code, with the intention of explaining newly encountered programming elements and idioms as found in working code to the reader. Key ideas are reinforced throughout by use in different contexts. "Now in its fourth edition, A book on C retains the features that have made it a proven best-selling tutorial and reference on the ANSI C programming language. This edition builds on the many existing strengths of the text to improve update, and extend the coverage of C, and now includes information on transitioning to Java and C++ from C."--Page 4 de la couverture Provides an introduction to the programming process by developing working programs to illuminate key features of the C++ programming language. This book presents the concepts of the programming process using the "dissection" method. It can be used by first time computer users or by experienced programmers who are transitioning to C++. Written by bestselling author Al Kelley and Ira Pohl, "A Book on C, 4th Ed". is a comprehensive tutorial and reference to C, based on the ANSI standard. This book assumes prior programming experience. The authors demonstrate the C language with numerous examples and extensive exercises that guide readers through each concept. "This book provides a broad overview of the language, and thus can be used by first time computer users, by experienced programmers who are transitioning to C#, or by those who simply need a handy C# reference."--BOOK JACKET