In this implementation, the structural design pattern, adapter was applied to the file autocomplete.py in order to offer flexibility to future developments of the search bar. Through the adapter (AskAdapter) and adaptee (Target) class, string sources can now be easily checked and communicated with through different interfaces.
In this implementation, the structural design pattern, adapter was applied to the file autocomplete.py in order to offer flexibility to future developments of the search bar. Through the adapter (AskAdapter) and adaptee (Target) class, string sources can now be easily checked and communicated with through different interfaces.