As mentioned in the tags, this is homework, using only standard java libraries.
The task is to create a program that schedules orders (which consist of pizzas) to be cooked in different ovens. Orders have a dealine, which must be met and pizzas have a cook time and a cooldown time, inherently all pizzas must be cooked by the deadline but cannot be cooked so early that their time out of the oven exceeds the cooldown time. If it is determined that it is not possible to fulfil the order by the deadline an exception is thrown. The main problem I cannot get my head around is how would I make the program reschedule the ovens to fit a new order in.
I cannot think of how to start this and would really appreciate any help!