Search:

Type: Posts; User: upad

Search: Search took 0.07 seconds.

  1. Thread: Point constructor

    by upad
    Replies
    11
    Views
    3,115

    Re: Point constructor

    thank you,

    I should be able to take it from here, will mail back if I am stuck again..
  2. Thread: Point constructor

    by upad
    Replies
    11
    Views
    3,115

    Re: Point constructor

    My code does not work as expected which is:
    (0,0)
    (3,6)
    (3.1,4.0)

    Actual result:
    (0,0)
    (3,6)
    (0,0)
  3. Thread: Point constructor

    by upad
    Replies
    11
    Views
    3,115

    Re: Point constructor

    As I said, I am just learning about classes and objects, and am not sure how to define constructors to handle different data types.kindly point me in the right direction..

    thanks,
    Sarita
  4. Thread: Point constructor

    by upad
    Replies
    11
    Views
    3,115

    Re: Point constructor

    Sorry,

    I skipped the toString method iin the above code (but yes, I did include that in my code).

    I expect the below main method to print Points of data types: int as well as double.therefore,...
  5. Thread: Point constructor

    by upad
    Replies
    11
    Views
    3,115

    Point constructor

    Hi,

    I'm a newbie in programming, trying to work on a practice problem in classes and objects. I tried the following to construct Point of type double, but when I print Point C, it prints 0,0; can...
Results 1 to 5 of 5