Java Bootcamp – Workbooks and Challenges
)}

Workbook – Part 1

From Java Bootcamp Resources -> Module 2 -> 7. The World of Objects, open the folder: airline-reservation-system.

If you can't find it, please download the updated resources from Github.

Task 1 – Create the class


In Quiz 7.1, you identified two types of objects:

You also found the corresponding fields and actions.

  1. So, create a new file named Person.java. Inside the file, create the Person class.

  2. Inside the Person class, define every field that describes a Person.

Task 2 – Create one object


Create one object of the Person class. Then, print every field in the object.

Your output should appear as follows:

>>: null >>: null >>: null >>: null >>: 0

Task 3 – Update each field in the object


Using dot syntax, update each field in the object. Then, print every field.

>>: Rayan Slim
>>: Canadian
>>: 01/01/1111
>>: [Rayan Slim, Canadian, 01/01/1111]
>>: 5

Your first three fields should be elements of passport.

Good Luck!

Feedback Summary
4.8
39 students
5

92%
4

3%
3

0%
2

0%
1

5%
Written Reviews
There are no written reviews yet.