Question: 1. Write the class Passenger which includes: a) 3 attributes: passport number (which is unique), name and age. b) a zero-arg constructor and a mutli-arg

1. Write the class Passenger which includes: a) 3 attributes: passport number (which is unique), name and age. b) a zero-arg constructor and a mutli-arg constructor. c) getters for name and age attributes. d) toString() method which overrides the Object's toString() method. e) equals() method which overrides the Object's equals() method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
