Direct and inverse acoustic scattering problems involving smart obstacles