add interface BasicRule and class App.java