Question: This is Java but I do not undrestand how the program works. ESPECIALLY the bottom part for Public String and private doubles. Also, why do

 This is Java but I do not undrestand how the program This is Java but I do not undrestand how the program works. ESPECIALLY the bottom part for Public String and private doubles. Also, why do we need the letter "o"? I don't understand. Please if you could explain the code in it's entirety but put extra emphasis on the bottom. Thank you.

'Apples.java *Tuna.java In Main.java X 2 public class Main l 3 public static void main (String[] args) 6 7 Complex a = new Complex (2.0, 3. O) ; Complex b new Complex (1.0, 2.0); System. out.println(a + "+tb+"-" + a.add (b) ); 10 12 13 14 15e 16 class Complex public Complex (double real, double imag) this.real- real; this. imag = imag; 18 19 20 21 public Complex add (Complex o #23 24 25 2 6 return new Complex (real t o.real, imag + o.imag); public String tostring) 28 29 30 31 32 return "(" + real + (imag 0.0 ? " - " : " + '') + (imag Main (1) [Java Application] C\Program FilesJava (2.0 + 3.01) + (1.0 + 2.01) 9.0.4 bin exe (Feb 21, 2018, 4:23:56 P (3.0 + 5.01) =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!