Actually, make that a couple of amateur UML questions! When creating a UML diagram to model some domain concepts and you come across a domain concept that \"holds\" some inf
For your first example, the first diagram, with composition, is correct. Your second option, referring to flightID as an int, could work but it's incomplete: that int by itself doesn't give you a way to access the Flight object. The Flight class doesn't magically store a list of flight objects that you can retrieve by number, so that second option would need a third class somewhere to store all the Flight objects.
For your second question, at the high level it really depends on personal preference (or your professor's personal preference!). Just try to use your best judgement.