Skip to main content
Ctrl+K
Jörg Faschingbauer - Home Jörg Faschingbauer - Home
  • Training Courses
  • About
  • Blog
  • Training Courses
  • About
  • Blog

Section Navigation

  • Course Descriptions
  • Pricing, Organizational
  • Log Of Past Courses
  • Complete Slide Material
    • Linux
    • Python Programming
    • The C Programming Language
    • C++ < 11
    • C++ >= 11
    • Design Patterns With C++
    • C++: TODO List
    • C++: Miscellaneous Live-Hacking
    • C++ Code
    • C++ Exercises
      • Working On Exercise Projects
      • OO Basics, Interfaces (Shapes)
      • C++ Exercises: Standard Template Library
        • Exercise: std::vector<>
        • Exercise: std::map<>
        • Exercise: Algorithms
        • Exercise: Uniquify A Sequence
        • Exercise: Filter Odd Elements
        • Exercise: Filter Elements Greater Than 10
        • Exercise: Generic Filter
        • Exercises: Sensor Repository (std::map)
      • Exercises: Design Patterns
      • FH Sensor OO (First Try)
      • Exercise: ConstantSensor_nopoly (Non-Polymorphic)
      • Exercise: RandomSensor_nopoly (Non-Polymorphic)
      • Exercise: MockSensor_nopoly (Non-Polymorphic)
      • Exercise: Mocking Switch (Non-Polymorphic)
      • Exercise: AveragingSensor_nopoly (Non-Polymorphic)
      • Exercise: Hysteresis_nopoly (Non-Polymorphic)
      • Exercise: LEDStripeDisplay_nopoly (Non-Polymorphic)
      • Exercise: Sensor Interface
      • Exercise: OneWire Sensor Class
      • Exercise: OneWire Sensor Factory
    • CMake
    • Is Software A Craft? Software Is A Craft! ⟶ Clean Code
    • Unit Testing With googletest
  • Training Courses
  • Complete Slide Material
  • C++ Exercises
  • C++ Exercises: Standard Template Library
  • Exercises: Sensor Repository (std::map)

Exercises: Sensor Repository (std::map)#

  • Exercises

See also

  • std::map

Exercises#

Write a class SensorRepository that is there to act as a “registry” for sensors. Sensors are registered there using a decriptive name.

  • Insert - Sunny Case
  • Lookup - Sunny Case
  • Remove - Sunny Case
  • Insert - Not Overwriting Existing Elements
  • Lookup - Not Found
  • Remove - Not Found
  • .size() Is const
  • Memory Leaks?
On this page
  • Exercises

© Copyright 2019-2025 (GPLv3), Jörg Faschingbauer.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.

Show Source