anonymous
  • anonymous
Java question Having trouble implementing a method that takes a parameter and returns the sum of the current object and parameter. How do I do this?
Computer Science
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

rsmith6559
  • rsmith6559
public int addParameter( int x ) { return( this.objectsValue + x ); }
anonymous
  • anonymous
how would I apply this to a method that takes in a complexnumber and returns a current object plus the parameter.
anonymous
  • anonymous
the sum of the current object and parameter equals the complex number

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
can u send me a resource online on this
rsmith6559
  • rsmith6559
I'm sorry, I don't know complex numbers from my elbow. It's doubtful that the entire object is a value. The reason I say that is that objects are usually made of parameters and methods, so I expect that IN the object is the value that will be added to the parameter. Quite possibly, this is done by one, or several (overloaded), of the object's methods.

Looking for something else?

Not the answer you are looking for? Search for more explanations.