course | mod | topic | first name | date completed |
---|---|---|---|---|
cit-130 | collections | maps | ||
module learning objectives |
Using chapter 23 of Liang as your guide, create a program that demonstrates the fundamental concept of the map
program objective |
Modeled after the NOC list in Mission Impossible, create a program that stores data about secret agents in a Class called Agent. Those objects are then stored in a map-based data structure in which the key is a String typed variable storing the Agent's ID number. |
program requirement 0: create an Agent |
Create a class called Agent with member variables to store that agent's: ID number, area of the world of focus, real name, assignment status, and contact info. Make each of the member variables private with public getter and setter methods. Create a simple class diagram of your agent. |
program requirement 1: Creating a map and accessing data |
Create a client class called IMF with a member variable of type Map whose keys are String type and value are Agent types. Instantiate 5 Agents, store them in the map. Create a method on IMF which displays to the console the entire contents of the map. Also create a method that will display all the data related to an Agent if he/she is stationed in an area of the world passed into the method as a parameter. |
program requirement 2: text-based UI |
Create a text-based interface that allows the user to extract an Agent from the map using that agent's ID. Allow the user to edit data on that particular Agent. Verify to the user that the data has successfully been stored. |