Every problem here asks you to design a class of your own besides Main: choose its fields, write its methods, create objects with new and set their fields. Write the class first, test it from main on the samples, and run every test before opening a hint.