i have one class that receives a string to and from a serial port and i have another class that uses the value received to calculate something and sends it back to the other class to send back to the port.
here is how i defined both classes in the beg.
public class Data extends Thread
public class Calculator extends Thread
the Data class has these two functions that i need to use.
I'm not quite sure how i should go about integrating these two strings i have...
I want the Calculator class to receive two Data objects to be able to use.
for example, in the calculator class i want to use
string something = A.get_readData();
but i know i can't do this...
public class Calculator(Data A, Data B) extends Thread
so can someone please help me figure this problem out?
i'm very new to programming so some explaination would be very helpful