Assignment: My Contact Manager v4
The last release of My Contact Manager was a hit! Consumers are exploding with excitement about the upcoming release for Android smart-phones: My Contact Manager v4! Leaks indicate that this release will no longer be constrained by finite arrays but will use the dynamic ArrayList class to hold arbitrarily many contacts!
There is just one problem: the programmer hired to complete this highly publicized release has decided to retire from the world of computing and become a lumberjack. We wish him all the best.
Your task is to re-factor My Contact Manager v3 so that it now utilizes an ArrayList of the Contact class. The GUI is unnecessary as a separate development team is designing the mobile GUI, they only require the Contact Manager functionality. Therefore, this implementation will be developed to operate via the command line.
Exceed the Expectations:
Implement the GUI yourself! This will require converting the ArrayList into a 2D array as needed to use the JTable class.
Its about having need to update this software from previous version.
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
ArrayList<String> contact = new ArrayList<String>();
contact.add("A - 122345");
contact.add("B - 323232");
contact.add("C - 121223");
JFrame f = new JFrame();
f.setTitle("Contact App");
Object[][] name_arr = (Object[][]) contact.toArray();
name_arr = (String[][])name_arr;
String[] column_name = {"Contact details"};
JTable j = new JTable(name_arr, column_name);
j.setBounds(30, 40, 200, 300);
JScrollPane sp = new JScrollPane(j);
f.add(sp);
f.setSize(500, 200);
f.setVisible(true);
}
Assignment: My Contact Manager v4 The last release of My Contact Manager was a hit! Consumers...