How janayasserfawzi/cs2-textutility-youssef_jana works
Project type and purpose
• This is a native C++ text‐processing library (CS2-TextUtility) with a small driver (main.cpp) to demonstrate/verify functionality. It is neither a multi-tier web app nor a service mesh; it’s a monolithic CLI tool/static library implementing basic string operations on C-style char arrays.
File structure
• Top level:
• CMakeLists.txt – build description
• main.cpp – executable entrypoint (CLI)
• text_utility_jana.{h,cpp}, text_utility_youssef.{h,cpp} – two sets of equivalent implementations of core functions
• builder/ – auto-generated CMake build artifacts (object files, link scripts, generated my_program executable)
• No external services, no network or DB layers, no MVC folders.
README
• Confirms library scope and lists ten core functions: word_count, char_count, count_vowels_consonants, reverse_string, is_palindrome, to_uppercase, to_lowercase, count_substring, caesar_encryption, caesar_decryption.
• No runtime dependencies beyond the C++ standard library.
Main components
a. User/CLI Interface
• Represents command‐line input parsing in main.cpp.
b. Core Library Module
• Two parallel implementation modules:
• TextUtilityJana
• TextUtilityYoussef
• Each module exposes the same public API (the ten functions).
c. Function Groupings
• Word operations (word_count, count_substring)
• Character operations (char_count, count_vowels_consonants, case conversions)
• String transformations (reverse_string, palindrome check, Caesar cipher)
d. Build System
• CMake orchestrates source compilation, linking into my_program (or a static library, if refactored).
Relationships and interactions
• Within each module, group the ten functions by category, showing internal call flow if any (e.g., Caesar encryption & decryption share helper logic).
Design patterns & principles
• Single Responsibility: each function does one text operation.
• Modular implementation: two interchangeable modules demonstrating polymorphism potential (can swap out one implementation).
• Layer separation: CLI layer vs. library layer vs. build layer.
Technologies & frameworks
• C++17 (or C++ standard per CMakeLists)
• CMake 3.28
• Standard Library only (no external dependencies)
Essential details to capture
• All ten core functions grouped by purpose
• Separation of concerns (CLI vs. processing library vs. build pipeline)