UBS interview question

implement ReadWriteLocks using pre java 5 knowledge