چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

C++ Programming: From Problem Analysis to Program Design (MindTap Course List)

D. S. Malik

قیمت نهایی

۴۰٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۸٪ تخفیف
  • تخفیف زمان‌دار−۹٬۰۰۰ تومان

۹٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
D. S. Malik
سال انتشار
۲۰۱۷
فرمت
PDF
زبان
انگلیسی
حجم فایل
۵۴٫۲ مگابایت
شابک
9781337102087، 9781337514491، 9781337669085، 9781337684392، 1337102083، 1337514497، 1337669083، 1337684392

دربارهٔ کتاب

Learn how to program with C++ using today's definitive choice for your first programming language experience -- C++ PROGRAMMING: FROM PROBLEM ANALYSIS TO PROGRAM DESIGN, 8E. D.S. Malik's time-tested, student-centered methodology incorporates a strong focus on problem-solving with full-code examples that vividly demonstrate the hows and whys of applying programming concepts and utilizing C++ to work through a problem. Thoroughly updated end-of-chapter exercises, more than 20 extensive new programming exercises, and numerous new examples drawn from Dr. Malik's experience further strengthen your understanding of problem solving and program design in this new edition. You review the important features of C++ 14 Standard with timely discussions that ensure this edition equips you to succeed in your CS1 course and beyond. Table of Contents 11 Chapter1: AN OVERVIEW Of COMPUTERS AND PROGRAMMING LANGUAGES 51 Introduction 52 A Brief Overview of the History of Computers 52 Elements of a Computer System 54 Hardware 54 Central Processing Unit and Main Memory 54 Input/Output Devices 55 Software 55 The Language of a Computer 56 The Evolution of Programming Languages 57 Processing a c++ Program 59 Programming with the Problem Analysis-Coding-Execution Cycle 61 Programming Methodologies 70 Structured Programming 70 Object-Oriented Programming 70 ANSI/ISO Standard C 72 Quick Review 72 Exercises 74 Chapter2: BASIC ELEMENTS OF C++ 77 A Quick Look at a C++ Program 78 The Basics of a C++ Program 83 Comments 84 Special Symbols 85 Reserved Words (Keywords 85 Identifiers 86 Whitespaces 87 Data Types 87 Simple Data Types 88 Floating-Point Data Types 90 Data Types, Variables, and Assignment Statements 92 Arithmetic Operators, Operator Precedence, and Expressions 93 Order of Precedence 95 Expressions 97 Mixed Expressions 98 Type Conversion (Casting 100 string Type 103 Variables, Assignment Statements, and Input Statements 104 Allocating Memory with Constants and Variables 104 Putting Data into Variables 107 Assignment Statement 107 Saving and Using the Value of an Expression 110 Declaring and Initializing Variables 111 Input (Read) Statement 112 Variable Initialization 115 Increment and Decrement Operators 119 Output 121 Preprocessor Directives 128 namespace and Using cin and cout in a Program 129 Using the string Data Type in a Program 130 Creating a C11 Program 130 Debugging: Understanding and Fixing Syntax Errors 134 Program Style and Form 137 Syntax 137 Use of Blanks 138 Use of Semicolons, Brackets, and Commas 138 Semantics 138 Naming Identifiers 139 Prompt Lines 139 Documentation 140 Form and Style 140 More on Assignment Statements 142 Programming Example: Convert Length 144 Programming Example: Make Change 148 Quick Review 152 Exercises 154 Programming Exercises 164 Chapter3: INPUT/OUTPUT 173 I/O Streams and Standard I/O Devices 174 cin and the Extraction Operator 175 Using Predefined Functions in a Program 180 cin and the get Function 183 cin and the ignore Function 184 The putback and peek Functions 186 The Dot Notation between I/O Stream Variables and I/O Functions: A Precaution 189 Input Failure 189 The clear Function 192 Output and Formatting Output 193 setprecision Manipulator 194 fixed Manipulator 195 showpoint Manipulator 196 C++ 14 Digit Separator 199 setw 200 Additional Output Formatting Tools 202 setfill Manipulator 202 left and right Manipulators 204 Input/Output and the string Type 206 Debugging: Understanding Logic Errors and Debugging with cout Statements 207 File Input/Output 210 Programming Example: Movie Tickets Sale and Donation to Charity 214 Programming Example: Student Grade 220 Quick Review 223 Exercises 225 Programming Exercises 231 Chapter4: Control Structures I (Selection) 237 Control Structures 238 SELECTION: if AND if . . . else 239 Relational Operators and Simple Data Types 239 Comparing Characters 240 One-Way Selection 241 Two-Way Selection 244 int Data Type and Logical (Boolean) Expressions 248 bool Data Type and Logical (Boolean) Expressions 248 Logical (Boolean) Operators and Logical Expressions 249 Order of Precedence 251 Relational Operators and the string Type 255 Compound (Block of) Statements 257 Multiple Selections: Nested if 257 Comparing if . . . else Statements with a Series of if Statements 260 Short-Circuit Evaluation 261 Comparing Floating-Point Numbers for Equality: A Precaution 262 Associativity of Relational Operators: A Precaution 263 Avoiding Bugs by Avoiding Partially Understood Concepts and Techniques 265 Input Failure and the if Statement 268 Confusion between the Equality Operator (==) and the Assignment Operator 271 Conditional Operator 273 Program Style and Form (Revisited): Indentation 274 Using Pseudocode to Develop, Test, and Debug a Program 274 switch Structures 277 Avoiding Bugs by Avoiding Partially Understood Concepts and Techniques (Revisited 284 Terminating a Program with the assert Function 286 Programming Example: Cable Company Billing 288 Quick Review 294 Exercises 295 Programming Exercises 307 CONTROL STRUCTURES II (REPETITION 315 Why Is Repetition Needed 316 while Looping (Repetition) Structure 319 Designing while Loops 323 Case 1: Counter-Controlled while Loops 324 Case 2: Sentinel-Controlled while Loops 327 Case 3: Flag-Controlled while Loops 333 Case 4: EOF-Controlled while Loops 336 eof Function 337 More on Expressions in while Statements 342 Programming Example: Fibonacci Number 343 for Looping (Repetition) Structure 347 Chapter5: Control Structrues II (Repetition) 315 Why Is Repetition Needed 316 while Looping (Repetition) Structure 319 Designing while Loops 323 Case 1: Counter-Controlled while Loops 324 Case 2: Sentinel-Controlled while Loops 327 Case 3: Flag-Controlled while Loops 333 Case 4: EOF-Controlled while Loops 336 eof Function 337 More on Expressions in while Statements 342 Programming Example: Fibonacci Number 343 for Looping (Repetition) Structure 347 Programming Example: Classifying Numbers 355 do. . .while Looping (Repetition) Structure 359 Divisibility Test by 3 and 9 361 Choosing the Right Looping Structure 363 break and continue Statements 363 Nested Control Structures 365 Avoiding Bugs by Avoiding Patches 371 Debugging Loops 374 Quick Review 374 Exercises 376 Programming Exercises 390 Chapter6: User-Defined Functions 397 Predefined Functions 398 User-Defined Functions 402 Value-Returning Functions 403 Syntax: Value-Returning Function 405 Syntax: Formal Parameter List 405 Function Call 405 Syntax: Actual Parameter List 406 return Statement 406 Syntax: return Statement 406 Function Prototype 410 Syntax: Function Prototype 411 Value-Returning Functions: Some Peculiarities 412 More Examples of Value-Returning Functions 414 Flow of Compilation and Execution 425 Programming Example: Largest Number 426 Void Functions 428 Value Parameters 434 Reference Variables as Parameters 436 Calculate Grade 437 Value and Reference Parameters and Memory Allocation 440 Reference Parameters and Value-Returning Functions 449 Scope of an Identifier 449 Global Variables, Named Constants, and Side Effects 453 Static and Automatic Variables 461 Debugging: Using Drivers and Stubs 463 Function Overloading: An Introduction 465 Functions with Default Parameters 467 Programming Example: Classify Numbers 470 Programming Example: Data Comparison 475 Quick Review 485 Exercises 488 Programming Exercises 503 Chapter7: User-Defined Simple Date Types, Namespaces, and the string Type 517 Enumeration Type 518 Declaring Variables 520 Assignment 520 Operations on Enumeration Types 521 Relational Operators 521 Input /Output of Enumeration Types 522 Functions and Enumeration Types 525 Declaring Variables When Defining the Enumeration Type 526 Anonymous Data Types 527 typedef Statement 527 Programming Example: The Game of Rock, Paper, and Scissors 528 Namespaces 537 string Type 542 Additional string Operations 546 Programming Example: Pig Latin Strings 555 Quick Review 560 Exercises 562 Programming Exercises 567 Chapter8: Arrays and Strings 571 Arrays 573 Accessing Array Components 575 Processing One-Dimensional Arrays 577 Array Index Out of Bounds 581 Array Initialization during Declaration 582 Partial Initialization of Arrays during Declaration 582 Some Restrictions on Array Processing 583 Arrays as Parameters to Functions 584 Constant Arrays as Formal Parameters 585 Base Address of an Array and Array in Computer Memory 587 Functions Cannot Return a Value of the Type Array 590 Integral Data Type and Array Indices 593 Other Ways to Declare Arrays 594 Searching an Array for a Specific Item 594 Sorting 597 Auto Declaration and Range-Based For Loops 601 C-Strings (Character Arrays 602 String Comparison 605 Reading and Writing Strings 606 String Input 606 String Output 608 Specifying Input/Output Files at Execution Time 609 string Type and Input/Output Files 609 Parallel Arrays 610 Two- and Multidimensional Arrays 611 Accessing Array Components 613 Two-Dimensional Array Initialization during Declaration 614 Two-Dimensional Arrays and Enumeration Types 614 Initialization 617 Print 618 Input 618 Sum by Row 618 Sum by Column 618 Largest Element in Each Row and Each Column 619 Passing Two-Dimensional Arrays as Parameters to Functions 620 Arrays of Strings 623 Arrays of Strings and the string Type 623 Arrays of Strings and C-Strings (Character Arrays 623 Another Way to Declare a Two-Dimensional Array 624 Multidimensional Arrays 625 Programming Example: Code Detection 627 Programming Example: Text Processing 633 Quick Review 640 Exercises 642 Programming Exercises 654 Chapter9: Records (structs) 661 Records (structs 662 Accessing struct Members 664 Assignment 667 Comparison (Relational Operators 668 Input/Output 668 struct Variables and Functions 669 Arrays versus structs 670 Arrays in structs 670 structs in Arrays 673 structs within a struct 674 Programming Example: Sales Data Analysis 678 Quick Review 692 Exercises 693 Programming Exercises 698 Chapter10: Classes and Data Abstraction 701 Classes 702 Unified Modeling Language Class Diagrams 706 Variable (Object) Declaration 706 Accessing Class Members 707 Built-in Operations on Classes 709 Assignment Operator and Classes 709 Class Scope 710 Functions and Classes 710 Reference Parameters and Class Objects (Variables 710 Implementation of Member Functions 711 Accessor and Mutator Functions 716 Order of public and private Members of a Class 720 Constructors 721 Invoking a Constructor 723 Invoking the Default Constructor 723 Invoking a Constructor with Parameters 724 Constructors and Default Parameters 727 Classes and Constructors: A Precaution 727 In-Class Initialization of Data Members and the Default Constructor 728 Arrays of Class Objects (Variables) and Constructors 729 Destructors 731 Data Abstraction, Classes, and Abstract Data Types 732 A struct versus a class 734 Information Hiding 735 Executable Code 739 More Examples of Classes 741 Inline Functions 750 Static Members of a Class 751 Programming Example: Juice Machine 757 Quick Review 772 Exercises 774 Programming Exercises 786 Chapter11: Inheritance and Composition 793 Inheritance 794 Redefining (Overriding) Member Functions of the Base Class 797 Constructors of Derived and Base Classes 804 Destructors in a Derived Class 813 Multiple Inclusions of a Header File 814 C11 Stream Classes 818 Protected Members of a Class 819 Inheritance as public, protected, or private 819 (Accessing protected Members in the Derived Class 820 Composition (Aggregation 823 Object-Oriented Design (OOD) and Object-Oriented Programming (OOP 828 Identifying Classes, Objects, and Operations 830 Programming Example: Grade Report 831 Quick Review 852 Exercises 852 Programming Exercises 861 Chapter12: Pointers, Classes, Virtual Functions, and Abstract Classes 867 Pointer Data Type and Pointer Variables 868 Declaring Pointer Variables 868 Address of Operator 870 Dereferencing Operator 871 Classes, Structs, and Pointer Variables 876 Initializing Pointer Variables 879 Initializing Pointer Variables Using nullptr 879 Dynamic Variables 880 Operator new 880 Operator delete 881 Operations on Pointer Variables 885 Dynamic Arrays 887 Arrays and Range-Based for Loops (Revisited 890 Functions and Pointers 891 Pointers and Function Return Values 892 Dynamic Two-Dimensional Arrays 892 Shallow versus Deep Copy and Pointers 895 Classes and Pointers: Some Peculiarities 897 Destructor 898 Assignment Operator 899 Copy Constructor 901 Inheritance, Pointers, and Virtual Functions 908 Classes and Virtual Destructors 915 Abstract Classes and Pure Virtual Functions 916 Address of Operator and Classes 924 Quick Review 926 Exercises 929 Programming Exercises 940 Chapter13: Overloading and Templates 943 Why Operator Overloading Is Needed 944 Operator Overloading 945 Syntax for Operator Functions 946 Overloading an Operator: Some Restrictions 946 Pointer this 949 Friend Functions of Classes 954 Operator Functions as Member Functions and Nonmember Functions 957 Overloading Binary Operators 960 Overloading the Stream Insertion (< >) Operators 966 Overloading the Assignment Operator 971 Overloading Unary Operators 979 Operator Overloading: Member versus Nonmember 985 Classes and Pointer Member Variables (Revisited 986 Operator Overloading: One Final Word 986 Programming Example: clockType 986 Programming Example: Complex Numbers 995 Overloading the Array Index (Subscript) Operator 1000 Programming Example: newString 1002 Function Overloading 1009 Templates 1009 Function Templates 1009 Class Templates 1011 C1111 Random Number Generator 1019 Quick Review 1021 Exercises 1023 Programming Exercises 1031 Chapter14: Exception Handling 1041 Handling Exceptions within a Program 1042 C++ Mechanisms of Exception Handling 1046 try/catch Block 1046 Using C11 Exception Classes 1053 Creating Your Own Exception Classes 1057 Rethrowing and Throwing an Exception 1066 Exception-Handling Techniques 1070 Terminate the Program 1070 Fix the Error and Continue 1070 Log the Error and Continue 1071 Stack Unwinding 1072 Quick Review 1075 Exercises 1077 Programming Exercises 1083 Chapter15: Recursion 1085 Recursive Definitions 1086 Direct and Indirect Recursion 1088 Infinite Recursion 1088 Problem Solving Using Recursion 1089 Tower of Hanoi: Analysis 1099 Recursion or Iteration 1099 Programming Example: Converting a Number from Binary to Decimal 1101 Programming Example: Converting a Number from Decimal to Binary 1105 Quick Review 1108 Exercises 1109 Programming Exercises 1114 Chapter16: Searching, Sorting, and the vector Type 1119 List Processing 1120 Searching 1120 Bubble Sort 1121 Insertion Sort 1125 Binary Search 1129 Performance of Binary Search 1132 vector Type (class 1133 Vectors and Range-Based for Loops 1138 Initializing vector Objects during Declaration 1140 Programming Example: Election Results 1141 Quick Review 1155 Exercises 1156 Programming Exercises 1161 Chapter17: Linked Lists 1165 Linked Lists 1166 Linked Lists: Some Properties 1167 Deletion 1173 Building a Linked List 1174 Linked List as an ADT 1179 Structure of Linked List Nodes 1180 Member Variables of the class linkedListType 1180 Linked List Iterators 1181 Print the List 1187 Length of a List 1188 Retrieve the Data of the First Node 1188 Retrieve the Data of the Last Node 1188 Begin and End 1188 Copy the List 1189 Destructor 1190 Copy Constructor 1190 Overloading the Assignment Operator 1191 Unordered Linked Lists 1191 Search the List 1192 Insert the First Node 1193 Insert the Last Node 1194 Header File of the Unordered Linked List 1199 Ordered Linked Lists 1200 Search the List 1201 Insert a Node 1202 Insert First and Insert Last 1206 Delete a Node 1207 Header File of the Ordered Linked List 1208 Print a Linked List in Reverse Order (Recursion Revisited 1211 printListReverse 1213 Doubly Linked Lists 1214 Default Constructor 1217 isEmptyList 1217 Destroy the List 1217 Initialize the List 1218 Length of the List 1218 Print the List 1218 Reverse Print the List 1218 Search the List 1219 First and Last Elements 1219 Circular Linked Lists 1225 Programming Example: DVD Store 1226 Quick Review 1246 Exercises 1246 Programming Exercises 1253 Chapter18: Stacks and Queues 1259 Stacks 1260 Stack Operations 1262 Implementation of Stacks as Arrays 1264 Initialize Stack 1267 Empty Stack 1268 Full Stack 1268 Push 1268 Return the Top Element 1270 Pop 1270 Copy Stack 1272 Constructor and Destructor 1272 Copy Constructor 1273 Overloading the Assignment Operator 1273 Stack Header File 1274 Programming Example: Highest GPA 1278 Linked Implementation of Stacks 1282 Default Constructor 1285 Empty Stack and Full Stack 1285 Initialize Stack 1286 Push 1286 Return the Top Element 1288 Pop 1288 Copy Stack 1290 Constructors and Destructors 1291 Overloading the Assignment Operator 1291 Stack as Derived from the class unorderedLinkedList 1294 Application of Stacks: Postfix Expressions Calculator 1295 Main Algorithm 1298 Function evaluateExpression 1298 Function evaluateOpr 1300 Function discardExp 1302 Function printResult 1302 Removing Recursion: Nonrecursive Algorithm to Print a Linked List Backward 1305 Queues 1309 Queue Operations 1310 Implementation of Queues as Arrays 1312 Linked Implementation of Queues 1321 Queue Derived from the class unorderedLinkedListType 1326 Application of Queues: Simulation 1327 Designing a Queuing System 1328 Customer 1329 Server 1332 Server List 1335 Waiting Customers Queue 1339 Main Program 1341 Quick Review 1345 Exercises 1346 Programming Exercises 1355 APPENDIX A: RESERVED WORDS 1359 APPENDIX B: OPERATOR PRECEDENCE 1361 APPENDIX C: CHARACTER SETS 1363 ASCII (American Standard Code for Information Interchange 1363 EBCDIC (Extended Binary Coded Decimal Interchange Code 1364 APPENDIX D: OPERATOR OVERLOADING 1367 APPENDIX F: HEADER FILES 1369 Header File cassert (assert.h 1369 Header File cctype (ctype.h 1370 Header File cfloat (float.h 1371 Header File climits (limits.h 1372 Header File cmath (math.h 1374 Header File cstddef (stddef.h 1375 Header File cstring (string.h 1375 HEADER FILE string 1376

قیمت نهایی

۴۰٬۰۰۰ تومان