This textbook is aimed at students of non-specialist courses with computer science components. Special emphasis is placed on the so-called life sciences, such as medical technology, rescue engineering, biotechnology, environmental engineering or process engineering. The textbook is suitable for readers in study and practice who want to get an introduction to computer science. The special feature of this book is the problem-based approach, as well as the exercises designed according to different taxonomy levels.
Author(s): Boris Tolg
Publisher: Springer
Year: 2023
Language: english
Pages: 326
Preface
Contents
Part I: Introduction
1: How to Work with This Book
2: Documentation of Languages and Programs
2.1 Syntax Diagrams
2.2 Unified Modelling Language (UML)
2.2.1 The Use Case Diagram
2.2.2 The Activity Diagram
2.2.3 The Class Diagram
3: Taxonomy Levels
Part II: Basics
4: The Language
4.1 The First Program
4.2 A Few More Tips
5: Variables
5.1 Variable Types
5.2 Type Conversion
5.3 Enumerations
5.4 Advanced: const, external and static
5.4.1 const
5.4.2 external
5.4.3 static
5.5 Advanced: An Introduction to Number Systems
5.5.1 Addition and Multiplication
5.5.2 Subtraction
5.5.3 Hexadecimal Numbers
Exercises
5.1 Variable Definition
5.2 Memory
5.3 Typecast
5.4 Enumerations
5.5 Variable Definition in C++
5.6 Number Systems
5.7 The Duotrigesimal Number System
5.8 Print the Memory Requirement
5.9 Print the ASCII Codes
5.10 Number System Conversion
5.11 Binary Addition and Subtraction
6: Branches
6.1 Operators for Comparisons and Logical Operations
6.2 if-statements
6.3 switch-case statements
Exercises
6.1 Comparisons
6.2 Instruction Blocks
6.3 Comparisons
6.4 Branches
6.5 if statement
6.6 switch-case statement
7: Loops
7.1 do-while loops
7.2 while-loops
7.3 for-loops
7.4 continue and break
Exercises
7.1 Loops
7.2 Use Cases
7.3 Loop Types
7.4 Endless Loops
7.5 Elevator
7.6 Printing of the Character Mapping Table
7.7 Program Analysis
7.8 Output of the Character Mapping Table
8: Arrays
8.1 Strings
8.2 Multidimensional Arrays
8.3 Multidimensional Arrays with Strings
Exercises
8.1 Indices
8.2 Strings
8.3 ASCII Table
8.4 Letter Comparison
8.5 Function Values
8.6 Numbers and Characters
8.7 Random Numbers
8.8 Largest Initial Letter
8.9 Program Analysis
8.10 Word Lengths
9: Functions
9.1 Overloading Functions
9.2 Function Prototypes
9.3 References and Arrays as Function Parameters
9.3.1 Arrays as Parameters
9.4 Advanced: Pre-assigned Function Parameters
9.5 Advanced: Variadic Functions
9.6 Advanced: Recursive Calls
9.7 Advanced: static
Exercises
9.1 Function Prototype
9.2 Return Value
9.3 Call by Reference
9.4 Variadic Functions
9.5 Recursion
9.6 static
9.7 Function Overloads
9.8 Input and Output Functions
9.9 Recursion
9.10 Program Analysis
9.11 Output of Parameters of a Variadic Function
10: Classes and Structures
10.1 Constructors and Destructors
10.2 Member Functions
10.3 Operators
10.4 Inheritance and Polymorphism
10.5 Advanced: Abstract Classes
10.6 Advanced: Structures
10.7 Advanced: const and static
10.7.1 const
10.7.2 static
Exercises
10.1 Visibility Levels
10.2 Operators
10.3 Include Guards
10.4 Abstract Classes
10.5 Member Variables
10.6 Constructors
10.7 Classes and Structures
10.8 Polymorphism
10.9 Polymorphism
10.10 The Class point2D
10.11 The Circle Class
10.12 Program Analysis
11: Pointer
11.1 Type Conversion
11.2 const
11.3 Arrays
11.4 Pointer Arithmetic
11.5 Advanced: Multidimensional Arrays
11.5.1 Variant 1: Pointer to Arrays
11.5.2 Variant 2: Pointer to Pointer
11.5.3 Variant 3: Virtual Dimensions
11.6 Advanced: malloc, realloc, free and memcpy
11.7 Functions
11.7.1 Call by Pointer
11.7.2 Function Pointer
11.8 Classes
11.8.1 Polymorphism
11.8.2 Operators
11.9 Advanced: Unions
Exercises
11.1 Memory Areas
11.2 Dereferencing
11.3 Multidimensional Arrays
11.4 Function Pointer
11.5 Stack and Heap
11.6 Memory Consumption
11.7 Pointer Arithmetic
11.8 Memory Reservation
11.9 Random Numbers
11.10 Random Numbers the Second
11.11 Program Analysis
Part III: Problems
12: Electrocardiography
12.1 Planning the Software Architecture
12.2 Loading the ECG Data
12.2.1 Description of the MIT Format
12.2.2 Extension of the Software Architecture
12.2.3 Implementation of the Loading Function
12.3 Data Analysis
12.3.1 Extension of the Software Architecture
12.3.2 Implementation of the Fast Fourier Transformation
12.4 Exporting the Results
12.4.1 Extension of the Software Architecture
12.4.2 Implementation of the Export Function
12.4.3 Presentation of the Results
Solutions
Chapter 5
Variable Definition
Memory
Typecast
Enumerations
Variable Definition in C++
Number Systems
The Duotrigonal Number System
Print the Memory Requirement
Print the ASCII Codes
Number System Conversion
Binary Addition and Subtraction
Chapter 6
Comparisons
Instruction Blocks
Comparisons
Branches
if-statement
switch-case Statement
Chapter 7
Loops
Use Cases
Loop Types
Endless Loops
Elevator
Printing of the Character Mapping Table
Program Analysis
Printing of the Character Mapping Table Part 2
Chapter 8
Indices
Strings
ASCII Table
Letter Comparison
Function Values
Numbers and Characters
Random Numbers
Largest Initial Letter
Program Analysis
Word Lengths
Chapter 9
Function Prototype
Return Value
Call by Reference
Variadic Functions
Recursion
static
Function Overloads
Input and Output Functions
Recursion
Program Analysis
Output of Parameters of a Variadic Function
Chapter 10
Visibility Levels
Operators
Include Guards
Abstract Classes
Member Variables
Constructors
Classes and Structures
Polymorphism
Polymorphism
The Class point2D
The Circle Class
Program Analysis
Chapter 11
Memory Areas
Dereferencing
Multidimensional Arrays
Function Pointer
Stack and Heap
Memory Consumption
Pointer Arithmetic
Memory Reservation
Random Numbers
Random Numbers the Second
Program Analysis
References