So I have designed my program but am stuck on one function.
The following is an excerpt from my class:
public class SqrXY
{
public void SqrXY (double x, double y)
{
xaxis = x;
yaxis = y;
}
public double addition ()
{
//this is what I am stuck on
}
}
And excerpt from my run class:
SqrXY instance1 = new SqrXY (4.0, 2.0);
SqrXY instance2 = new SqrXY (6.0, 3.0);
SqrXY instance3 = instance1.addition(instance2); //instance3 is initialized as (10.0, 5.0)
So I need to create an addition function which will add the values of the already initialized objects. This is the last part of my assignment and I've been stuck on it for a couple days any help would be appreciated.