CENG 218 Data Structures 2024-2025 Spring

In this Course I will be using C++ only.  No other programming language will be used and accepted.
Before beginning Data Structures course, you should have a solid foundation in the following C/C++ programming concepts. Please review these topics if needed:

Core Language Features

  1. Basic Syntax and Control Structures
    • Variable declaration and initialization
    • Data types (int, float, double, char, bool)
    • Operators (arithmetic, relational, logical)
    • Control statements (if, else, switch)
    • Loops (for, while, do-while)
    • Break and continue statements
  2. Functions
    • Function declaration and definition
    • Parameter passing (by value and by reference)
    • Return types
    • Function overloading
    • Default arguments
    • Scope rules
  3. Arrays and Strings
    • Array declaration and initialization
    • Multi-dimensional arrays
    • Character arrays
    • String manipulation
    • Array bounds and memory management
    • std::string basics

Object-Oriented Programming Fundamentals

  1. Classes and Objects
    • Class definition
    • Object creation
    • Member functions and data members
    • Access specifiers (public, private, protected)
    • Constructors and destructors
    • This pointer
  2. Memory Management
    • Stack vs. heap memory
    • Dynamic memory allocation (new, delete)
    • Memory leaks and dangling pointers
    • Array allocation and deallocation
    • Understanding memory addresses

Essential C++ Features

  1. References and Pointers
    • Reference variables
    • Pointer declaration and initialization
    • Pointer arithmetic
    • Pointer to objects
    • Array-pointer relationship
    • Function pointers basics
  2. Standard Template Library Basics
    • Understanding templates
    • Vector usage
    • Basic algorithms (linear, binary search, selection, insertion, bubble sort)
    • Iterators concept (optional)

File Operations

  1. File Handling
    • File streams (ifstream, ofstream)
    • Basic file operations
    • Error handling
    • Text file processing

Programming Best Practices

  1. Code Organization
    • Header files (.h)
    • Implementation files (.cpp)
    • Include guards
    • Namespace usage
  2. Debugging Skills
    • Using a debugger
    • Common debugging techniques
    • Error identification
    • Problem-solving approaches
  3. Code Style
    • Proper indentation
    • Meaningful variable names
    • Comments and documentation
    • Code organization

Required Proficiency Level Students should be able to:

  1. Write complete programs independently
  2. Debug syntax and logical errors
  3. Implement basic algorithms
  4. Use IDEs effectively
  5. Read and understand error messages
  6. Write modular, well-organized code

Review Resources

  1. Online Materials:
    • cplusplus.com reference
    • cppreference.com
    • GeeksforGeeks C++ section
  2. Recommended Review Texts:
    • "C++ Primer" by Stanley Lippman
    • "Accelerated C++" by Andrew Koenig
    • Online C++ tutorials from Keith Schwarz