How to extract from a vector and add them to another vector?
Posted on 2003-12-06
Hi every one..
Could you please help me with my question..
-I have a class called Customer which has four variables (int id, String name, String city, String phone)
- I have another class called TestCustomer that has a main method..
Now in this class I have to:
1- create five customers and add them to a vector called "Customers"
2- create another Vector called "CustomerNames" and extract the 5 customers' names from the "Customers" vector and add them to the "CustomerNames" vectors..
My questions are:
1- when I create the five customers do I have to specify the values of the attributes?
2- How can I extract from a vector and add it to another one..
thanks in advance,,
waiting for your answers