// Create a new object for the statistics
BuildStats stats=new BuildStats();
// Create a Sensor1 object and a Thread to run it
Sensor1 sensor1=new Sensor1(stats);
Thread thread1=new Thread(sensor1,"Sensor 1");
// Create a Sensor 2 object and a Thread to run it
Sensor2 sensor2=new Sensor2(stats);
Thread thread2=new Thread(sensor2,"Sensor 2");