79123078

Date: 2024-10-24 17:32:43
Score: 0.5
Natty:
Report link

A possible solution might be to replace many "update" methods with one.

class HotelRoom {

    // fields and constructors

    void apply(HotelRoomPatch patch) {
        // logic of update
    }
}
interface HotelRoomPatch {
    Optional<String> name();
    Optional<SaleState> saleState();
    // etc.
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: nik0x1