Write a method named movebug that takes a bug as aparameter


1. Write a method named moveBug that takes a bug as aparameter and invokes move. Test your method by calling it from main.

2. Modify moveBug so that it invokes canMove and moves the bug only ifit can.

3. Modify moveBug so that it takes an integer, n, as a parameter, andmoves the bug n times (if it can).

4. Modify moveBug so that if the bug can't move, it invokes turn instead.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a method named movebug that takes a bug as aparameter
Reference No:- TGS01368795

Expected delivery within 24 Hours