Question: There are two machine A and B.
Install a software or a service in the machine B.
Now,machine A through the remoting access the machine B.
how to monitor this action.

Answer: 
```
public class B {
  void f1(){}   
}

public class A extends B {
  void f2(){}
}

void main(String[] args) {
  A a =  new A();
  a.f2();
}

```
You have several options

* Make your object a have a reference varible of B `B a = new B()` (ignore the naming violation ;))
* update the call of f2() and cast it to B
* Add f2() in A and then override it in B

Then if you call

```
A o = new B();
o.f2();

```

it will call the f2() in object B

There is nothing you can put in `<- free space here` to make it call f2() in B I am afraid. Perhaps a trick interview questions?