Modified removeClassButton method by adding printing option before class's deletion.