I mean the assignment definitely states that the class you write is supposed to be generic, which yours isn't, but with how poorly the rest of the assignment is worded, who knows. There's actually no point making it a generic class, because you're always using it for Products, so you could easily be correct that writing a generic class is not intended. I'd check with your tutor if possible.
Couple other comments:
Your method for making a unique identifier is no good, most obviously because it resets to 1 any time the program restarts. Using static variables for global state is generally frowned on(*), it has other, more technical issues. For example it will cause problems if an application ever has to be load-shared across more than one server (when each server will have its own copy of the static variable) and it can cause thread-safety issues. The usual way of producing unique identifiers from nowhere is to use GUIDs, or java.util.UUID in Java. New one up in the constructor.
Secondly, the way you've subclassed ComputerOrder is insufficient, because I can still do this:
Quote:
ComputerOrder order = new ComputerOrder();
Cheese deliciousCheese = new Cheese();
order.add(deliciousCheese);
The general version of add() is still available from the superclass. Rather than creating new methods for each subtype allowed in ComputerOrder, override the original add method and throw an IllegalArgumentException if the Product is not of an allowed type. That's not how we'd normally do something like that, by the way, because it's setting traps for users of the class, but it's forced on us by the assignment.
* If you're wondering "well what the hell do I use for global state, if I don't use static variables?" then the answer is: 1. Avoid having global state whenever possible and 2. if it's unavoidable, use a
singleton. This is in a footnote because it's advanced and not very relevant, just thought I'd put it in in case you were wondering.