




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive overview of fundamental programming concepts, including modular programming with functions, parameters, and return values. It covers iteration control structures such as while loops, do-while loops, and for loops, along with nested loops. Additionally, it explores array processing techniques, including display, total, max, min, parallel arrays, sort, fixed arrays, dynamic arrays, and multidimensional arrays, with examples in multiple programming languages. This resource is designed to help students understand and implement these core concepts in their programming projects, offering practical insights and code examples.
Typology: Study Guides, Projects, Research
1 / 563
This page cannot be seen from the preview
Don't miss anything!





























































































Programming Fundamentals by Authors and Contributors is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted. Creative Commons Attribution CC-BY License You are free to:
Contents xv About this Book 1 Author Acknowledgements 5
Systems Development Life Cycle Kenneth Leroy Busbee
Program Design Kenneth Leroy Busbee
Program Quality Dave Braunschweig
Pseudocode Kenneth Leroy Busbee
Flowcharts Kenneth Leroy Busbee
Software Testing Kenneth Leroy Busbee
Integrated Development Environment Kenneth Leroy Busbee
Version Control Dave Braunschweig
Input and Output Kenneth Leroy Busbee
Arithmetic Operators 121 Integer Division and Modulus Kenneth Leroy Busbee
Unary Operations Kenneth Leroy Busbee
Lvalue and Rvalue Kenneth Leroy Busbee
Data Type Conversions 138 Input-Process-Output Model Dave Braunschweig
C++ Examples Dave Braunschweig
C# Examples Dave Braunschweig
Java Examples Dave Braunschweig
JavaScript Examples Dave Braunschweig
Python Examples Dave Braunschweig
Swift Examples Dave Braunschweig
Practice: Data and Operators 177
Modular Programming 183 Hierarchy or Structure Chart Kenneth Leroy Busbee
Function Examples Dave Braunschweig
Parameters and Arguments Dave Braunschweig
Call by Value vs. Call by Reference Dave Braunschweig
Return Statement Dave Braunschweig and Kenneth Leroy Busbee
Void Data Type 206 Scope Kenneth Leroy Busbee
Programming Style 211 Standard Libraries 217 Program Plan 221 C++ Examples Dave Braunschweig
C# Examples Dave Braunschweig
Java Examples Dave Braunschweig
JavaScript Examples Dave Braunschweig
Python Examples Dave Braunschweig
Swift Examples Dave Braunschweig
Practice: Functions 235
Structured Programming 241 Selection Control Structures 245
Iteration Control Structures 315 While Loop Kenneth Leroy Busbee
Do While Loop 325 Flag Concept Kenneth Leroy Busbee
For Loop Kenneth Leroy Busbee
Branching Statements Kenneth Leroy Busbee
Increment and Decrement Operators Kenneth Leroy Busbee
Integer Overflow Kenneth Leroy Busbee
Nested For Loops Kenneth Leroy Busbee
Program Plan 356 Loop Examples Dave Braunschweig
C++ Examples Dave Braunschweig
C# Examples Dave Braunschweig
Java Examples Dave Braunschweig
JavaScript Examples Dave Braunschweig
Python Examples Dave Braunschweig
Swift Examples Dave Braunschweig
Practice: Loops Kenneth Leroy Busbee
Arrays and Lists 389 Index Notation 393 Displaying Array Members 397 Arrays and Functions 400 Math Statistics with Arrays 403 Searching Arrays 406 Sorting Arrays 409 Parallel Arrays Dave Braunschweig
Multidimensional Arrays Kenneth Leroy Busbee
Fixed and Dynamic Arrays Dave Braunschweig
Program Plan 420 C++ Examples Dave Braunschweig
C# Examples Dave Braunschweig
Java Examples Dave Braunschweig
JavaScript Examples Dave Braunschweig
Exception Handling 507
Objects and Classes Dave Braunschweig
Encapsulation Dave Braunschweig
Inheritance and Polymorphism Dave Braunschweig
C++ Examples Dave Braunschweig
C# Examples Dave Braunschweig
Java Examples Dave Braunschweig
JavaScript Examples Dave Braunschweig
Python Examples Dave Braunschweig
Swift Examples Dave Braunschweig
Practice Kenneth Leroy Busbee
Welcome to Programming Fundamentals – A Modular Structured Approach, 2nd Edition! The original content for this book was created by Kenneth Leroy Busbee and written specifically for his course based on C++. The goal for this second edition is to make it programming-language neutral, so that it may serve as an introductory programming textbook for students using any of a variety of programming languages, including C++, C#, Java, JavaScript, Python, and Swift. Other languages will be considered upon request. Programming concepts are introduced generically, with logic demonstrated in pseudocode and flowchart form, followed by examples for different programming languages. Emphasis is placed on a modular, structured approach that supports reuse, maintenance, and self-documenting code. As you begin to review this edition, please keep the audience in mind. If something is missing, think about whether that concept applies to programming in general or only to certain programming languages, and whether it is a About this Book | 1
Structures. This textbook/collection covers the first of those three courses. Learning Modules The learning modules of this textbook were written as standalone modules. Students using a collection of modules as a textbook will usually view its contents by reading the modules sequentially as presented by the author of the collection. However, many readers of these modules may find them as a result of an Internet search. The textbook design allows the author of a module to create web links to other modules and Internet locations and designate any necessary prerequisites. Conceptual Approach The learning modules of this textbook were, for the most part, written without consideration of a specific programming language. Concepts are presented generically, with program logic demonstrated first in pseudocode and flowchart format. Language-specific examples follow the general overview. Re-use and Customization The Creative Commons (CC) Attribution-ShareAlike license applies to all modules in this textbook. Under this license, any module may be used or modified for any purpose as long as proper attribution to the original author(s) is About this Book | 3
maintained and you distribute your contributions under the same license. PDF Conversion Problems There are several known PDF printing problems. A description of the known problems are: