Hello, ive been doing some activites in the book i purchased. This particular question has me stuck. I know i have to use a if loop. I just started using methods and loops
You have been hired as a software developer for Canada’s customs - Toronto Pearson
International Airport. Your job is to develop part of the Canada Passport System. The Database
Administrator has forwarded to you the database for all the Canadians. For simplicity, assume
you only have five records (i.e., only five people on file). These fixed records are the
following:
First name, Last name, SIN, Last Date of Entry to Canada, Number of Entries
Mike beee 4567 12-12-1999 7
Jessie weree 4444 07-07-2007 1
Liza veee 2121 05-05-2013 2
Zico qeeee 2444 Never left the country 0
Hint: the two dimensional array stores all the values. In addition, all these values should be
of type String.
The Canadian officer can always see the following four choices: 1) Show custom’s database, 2)
Update custom’s database, 3) A summary of a passenger’s record, and 4) Exit. Choice 1
always allows the officer to see all the database records (i.e., the five records). Each of these
records consists of the following: First Name, Last Name, SIN, Last Date of Entry to
Canada, and the Number of Entries (i.e., see the above stored values).
Choice 2 allows the officer to update the database whenever one of the five Canadian passengers
arrives. Once the officer chooses this option, the system will ask him/her for the SIN of the
passenger. Then the system will ask for today’s date (i.e., the recent entry date). The system will
then reflect those changes on the console screen and the number of entries will be increased by
one.
Choice 3 summarizes the record for one passenger where his/her first and last names and last
date of entry to Canada will be shown. The last date of entry should only have the last four digits
(i.e., only the year). To extract those digits, you should use the String’s method(s). However,
before a record is summarized, the records of all Canadians should be shown on the screen in
order to allow the officer to choose among those records. Choice 4 allows the officer to exit from
the system completely; otherwise the list of choices should be always shown on his/her monitor.
This is the code i have so far.
You have been hired as a software developer for Canada’s customs - Toronto Pearson
International Airport. Your job is to develop part of the Canada Passport System. The Database
Administrator has forwarded to you the database for all the Canadians. For simplicity, assume
you only have five records (i.e., only five people on file). These fixed records are the
following:
First name, Last name, SIN, Last Date of Entry to Canada, Number of Entries
Mike beee 4567 12-12-1999 7
Jessie weree 4444 07-07-2007 1
Liza veee 2121 05-05-2013 2
Zico qeeee 2444 Never left the country 0
Hint: the two dimensional array stores all the values. In addition, all these values should be
of type String.
The Canadian officer can always see the following four choices: 1) Show custom’s database, 2)
Update custom’s database, 3) A summary of a passenger’s record, and 4) Exit. Choice 1
always allows the officer to see all the database records (i.e., the five records). Each of these
records consists of the following: First Name, Last Name, SIN, Last Date of Entry to
Canada, and the Number of Entries (i.e., see the above stored values).
Choice 2 allows the officer to update the database whenever one of the five Canadian passengers
arrives. Once the officer chooses this option, the system will ask him/her for the SIN of the
passenger. Then the system will ask for today’s date (i.e., the recent entry date). The system will
then reflect those changes on the console screen and the number of entries will be increased by
one.
Choice 3 summarizes the record for one passenger where his/her first and last names and last
date of entry to Canada will be shown. The last date of entry should only have the last four digits
(i.e., only the year). To extract those digits, you should use the String’s method(s). However,
before a record is summarized, the records of all Canadians should be shown on the screen in
order to allow the officer to choose among those records. Choice 4 allows the officer to exit from
the system completely; otherwise the list of choices should be always shown on his/her monitor.
This is the code i have so far.