This is a homework dump, and you've dumped this (and been banned from) other java sites. As a result I'm going to lock this thread.

@rahul12321, you should become familiar with the academic...