Archaeology Rocks is a global company that provides groups of people to perform excavations (archaeological digs) in all parts of the world. The company has contracted you to write a small application to help manage the people sent on these field trips. Certain classes needed by this Data Involving Groups Sent (DIGS) system are developed in the following tasks.
Note: There may be better design decisions for this task but you are being asked to write a utility class for the purpose of practising class methods.) Each person associated with DIGS has an identity card with a chip that contains a personal information code, formatted as follows (all letters in uppercase):
F – female or M – male, three digit personnel number (digits 0 to 9 inclusive, repetition allowed), classification (possible allowed values of A, S or V), first aid level (possible allowed values of 0, 1 or 2), A driving licence list that contains between 1 and 3 characters inclusive, representing the vehicles the person can operate. There are 3 types of vehicle licences, a car licence (C), a bike riders licence (R), and a heavy vehicle licence (H). The list contains any combination of C, R and H where each letter occurs at most once. All people have at least one licence (and at most three).
The classification values have the following meaning:
The first aid level values have the following meaning:
The DIGS system requires the ability to check that an identity code string is valid, and the ability to extract or update certain information contained in an identity code.
Write a utility class in a file called Identity.java that has separate class methods to perform the following functionality (assume all the String arguments are valid codes except for the method in Task 1b which is compulsory for CSE4OOF but is a bonus optional question for CSE1OOF – in this task you are asked to check that the code argument is valid).
Having implemented the Identity utility class, add Javadoc style comments to any four methods only of this class.
In a file called IdentityTester.java write appropriate tests to check the functionality of your Identity utility class.