public class A
extends java.lang.Object
Constructor and Description |
---|
A(double x,
double y)
Initializes a newly create A object.
|
Modifier and Type | Method and Description |
---|---|
double |
getX()
Returns the value of the x attribute.
|
double |
getY()
Returns the value of the y attribute
|
double |
product() |
double |
sum() |
java.lang.String |
toString()
toString method for the A class.
|
java.lang.String |
toString(java.lang.String message)
An overloaded method that takes a string and returns the result of
the original
toString() appended to it. |
public A(double x, double y)
x
- the x valuey
- the y valuepublic double getX()
public double getY()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String message)
toString()
appended to it.message
- the string to prepend to the original toStringpublic double sum()
public double product()