public void retailerFunc() { Thread.Sleep(500); ChickenFarm chicken = new ChickenFarm(); OrderClass ob = new OrderClass(); int senderId = Convert.ToInt32(Thread.CurrentThread.Name); int cardNumber = rng.Next(5000, 7000); int amount = rng.Next(50, 100); ob.setSenderId(senderId); ob.setCardNo(cardNumber); ob.setAmount(amount); //Now we should send this object to the encoder to convert into string String Encoder_result = Encoder(ob); MultiCellBuffer cell_order = new MultiCellBuffer(); cell_order.setOneCell(Encoder_result); }