Howdy, Stranger!

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


constructor with parameters

RodeoBurnzRodeoBurnz Member Posts: 47
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.


  • NazgulNazgul Member Posts: 63
    [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] ??

  • chamsterchamster Member Posts: 662
    : [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

  • Justin BibJustin Bib USAMember Posts: 0

    ___ | | free video tutorials and ebooks about | PL/SQL R Delphi MATLAB C# Perl Python Swift Ruby Assembly PHP JavaScript Visual Basic .NET Scratch Objective-C C++ Go Visual Basic Java C Scheme Alice Erlang Transact-SQL Fortran Hack Crystal FoxPro Lisp ABAP D Bash LabVIEW Apex Rust Clojure SAS Ada Scala Prolog Awk Kotlin Dart VBScript Logo COBOL F# Lua Julia ML | ___________

Sign In or Register to comment.