Car Talk Lab

<< Cryptography Lab | LabTrailIndex | GameStateLab >>

How do you search for a name?

All the names and jobs are in the ArrayList of Employee. The Employee class has an "get" method (technically called an "accessor" method for these, like

         Employee e = new Employee ("Oscar Muppet", "Trash Talker");
         String full=e.getName();
         String last=e.getLastName();
         String j=e.getJob();

Here e is the instance of the Employee class, and full would contain "Oscar Muppet", last would contain "Muppet", and j would contain "Trash Talker"