Results 1 to 4 of 4
  1. #1
    jonytek is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default Help - end of semester prioject. Linking multiple addresses to a client with 2 lists.

    Hi Guys,
    Im working on my end of semester project and i haveing trouble in a certain area. The project is to create a system that records waste and creates an invoice linking it to a client at an address. i have two csv files one address and one client. 1 client can have many addresses, I need to link these. Atm I have created an ArrayList that contains String[] that have split up the customer addresses using the StringTokenizer. Each address has a client id that i need to use to link to the addresses to the clients.

    Does anyone have any pointers for doing this? Really appreciated.

    CLIENT LIST:
    Java Code:
    1	Megadodo Publications	1943 Main Circle
    2	LexCorp	1005 Elm Circle
    3	ZiffCorp	1436 Ninth Circle
    4	General Services Corporation	3999 Ninth Road
    5	Colonial Movers	4173 First Avenue
    6	LexCorp	4311 Cedar Circle
    7	Kumatsu Motors	521 Fourth Avenue
    8	The Krusty Krab	1817 Seventh Street
    9	Transworld Consortium	2823 Fifth Circle
    10	Big Kahuna Burger	3160 Ninth Street
    11	Sample, inc	2572 Pine Road
    12	Dunder Mifflin	689 Fourth Road
    13	Kumatsu Motors	898 Lake Avenue
    14	Acme, inc.	2456 Second Avenue
    15	Water and Power	4695 Fifth Avenue
    16	Axis Chemical Co.	2676 View Avenue
    17	Sto Plains Holdings	4125 Fifth Road
    18	Gizmonic Institute	4119 Maple Circle
    19	North Central Positronics	71 Fourth Circle
    20	Tip Top Cafe	2998 Maple Blvd.
    21	Spade and Archer	907 Cedar Circle
    22	Niagular	3183 Main Circle
    23	Mooby Corp	3146 Oak Road
    24	Extensive Enterprise	824 Park Circle
    25	Klimpys	4544 Pine Road
    26	Sixty Second Avenue	3889 Main Blvd
    27	Atlantic Northern	795 Ninth Avenue
    28	ZiffCorp	1847 Sixth Circle
    29	Zevo Toys	2639 View Blvd
    30	Thrift Bank	4037 Eighth Avenue
    31	ZiffCorp	3362 Main Circle
    32	Big Kahuna Burger	3226 Hill Street
    33	General Products	1672 Fourth Road
    34	Globex Corporation	4020 Elm Blvd
    35	Taco Grande	2871 Main Street
    36	Virtucon	3208 Fifth Blvd
    37	Three Waters	2254 Fifth Road
    38	Smith and Co.	2933 Washington Street
    ADDRESS LIST
    Java Code:
    1	1	12	Bowman St	Seven Hills	2147
    2	1	56	Alt St	Seven Hills	2147
    3	2	88	Barnstaple Rd	Seven Hills	2147
    4	2	21	Bay St	Seven Hills	2147
    5	3	36	Bay St	Seven Hills	2147
    6	4	56	Chandos St	Seven Hills	2147
    7	5	32	Church St	Seven Hills	2147
    8	6	45	Clements St	Seven Hills	2147
    9	6	15	College St	Seven Hills	2147
    10	7	98	Coranto St	Seven Hills	2147
    11	8	25	Dalhousie St	Seven Hills	2147
    12	9	98	Dalhousie St	Seven Hills	2147
    13	10	58	Dalhousie St	Seven Hills	2147
    14	11	48	Dalhousie St	Seven Hills	2147
    15	12	68	Dobroyd Pde	Seven Hills	2147
    16	13	48	Elswick St	Seven Hills	2147
    17	13	68	Elswick Sts	Seven Hills	2147
    18	14	48	Frederick St	Seven Hills	2147
    19	15	98	Garfield St	Seven Hills	2147
    20	16	85	Glover St	Seven Hills	2147
    21	17	1	Great North Rd	Seven Hills	2147
    22	18	2	Great North Rd	Seven Hills	2147
    23	19	58	Great North Rd	Seven Hills	2147
    24	19	68	Great North Rd	Seven Hills	2147
    25	20	68	Halley St	Seven Hills	2147
    26	21	49	Henley Marine Dr	Seven Hills	2147
    27	22	98	Kings Rd	Seven Hills	2147
    28	23	79	Lyons Rd	Seven Hills	2147
    29	24	458	Lyons Rd	Seven Hills	2147
    30	25	98	Lyons Rd 	Seven Hills	2147
    31	26	58	Marion St	Seven Hills	2147
    32	27	685	Mary St	Seven Hills	2147
    33	28	984	Norton St	Seven Hills	2147
    34	29	78	Norton St	Seven Hills	2147
    35	30	5	Park Rd	Seven Hills	2147
    36	30	456	Pine Av	Seven Hills	2147
    37	31	42	Rodd Rd	Seven Hills	2147
    38	32	45	Russell St	Seven Hills	2147
    39	33	75	St Georges Cr	Seven Hills	2147
    40	34	45	Tillock St	Seven Hills	2147
    41	35	85	Tranmere St	Seven Hills	2147
    42	35	547	Victoria Rd	Seven Hills	2147
    43	36	45	Victoria Rd	Seven Hills	2147
    44	36	74	Victoria Rd	Seven Hills	2147
    45	37	78	Wattle St	Seven Hills	2147
    46	32	5	Werona Av	Seven Hills	2147
    47	36	75	William St	Seven Hills	2147
    48	31	85	William St	Seven Hills	2147
    49	38	74	William St	Seven Hills	2147
    50	1	22	Harwood St	Seven Hills	2147

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,784
    Rep Power
    7

    Default

    You could have a Client class that has an ID, Name and a List of Addresses.

  3. #3
    jonytek is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default

    Ok. Can you give me a bit more info. Do you mean create a new Client object for each client? My lecturer has recommended me that I dont create multiple objects for the customers or clients but do it all within 1 class.

    Ive been racking my brain over this one. i just cant figure it out.

  4. #4
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,784
    Rep Power
    7

    Default

    I don't understand your assignment. You say you have a Client file and an Address file. Yet the Client file has an address as well.

    As far as your instructions of "do it all in one class", it is stoopid! Java is an OO language and to forgo the very nature of the language just does not make sense.

Similar Threads

  1. Last Java assignment for the semester.
    By Z-slasher in forum New To Java
    Replies: 4
    Last Post: 04-28-2011, 01:30 AM
  2. Linking Multiple GUIs
    By Penguin Buddha in forum AWT / Swing
    Replies: 11
    Last Post: 04-24-2011, 05:59 AM
  3. Validation for multiple email addresses
    By dushyant1244 in forum Advanced Java
    Replies: 0
    Last Post: 09-24-2010, 06:00 AM
  4. My semester proj.
    By ramsrocker in forum New To Java
    Replies: 4
    Last Post: 03-08-2009, 05:25 AM
  5. Half a semester into java
    By apfroggy0408 in forum New To Java
    Replies: 3
    Last Post: 12-17-2007, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •