constructor with parameters

could someone please help me implement the constructor below, I don't know what to use for Address addr, the strings are ok, i dont know what to do with the Address, everytime I try to compile it says the constructor not found. please help. thank you.

public Customer (String id, String name, Address addr, String tele){


the class that contains the main method:
john = new Customer("1234","John Doe",[red] Address [/red],"555-1234");

I dont know what they want me to put in place of Address.


  • [b][red]This message was edited by Nazgul at 2002-10-22 7:17:26[/red][/b][hr]
    perhaps use instance of class instead of class

    [code]john = new Customer("1234","John Doe", new Address() ,"555-1234");[/code] ??

  • : [code]
    : john = new Customer("1234","John Doe",[red] Address [/red],"555-1234");
    : [/code]

    Most likely you're expected to send in an object of type Address. You might need to create one by [blue]new Address ()[/blue] or obtain it from somewhere by [blue].getAddress ()[/blue].

    If no such thing is possible, you can probably send in [blue]null[/blue] as a parameter instead of an actual instance.

    Kind Regards
    (+46/0) 708-70 73 92

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!