describe how you would create a java program for cr