Question: Re - do Problem 3 - 7 with a Choreographer and 3 helpers. You may choose the starting positions of each robot. Karel has taken

Re-do Problem 3-7 with a Choreographer
and 3 helpers. You may choose the
starting positions of each robot.
Karel has taken a part time job as a
gardner. Karel's specialty is planting
beepers. Karel's current task is to plant
one and only one beeper on each corner
around the "+" shaped wall arrangement
as shown in the situation in Figure 3-8.
This task should use 28 beepers in total.
Task.kt
import kareltherobot.*
import java.awt.Color
import kareltherobot.Directions.*
// Create your new robot classes here
class Choreographer:UrRobot
{
constructor(st:Int, ave:Int, dir:Direction, beepers:Int):super(st, ave, dir, beepers){}
private var lisa:UrRobot = UrRobot( street: 9, avenue: 6, South, beepers: 7, Color.PINK)//1st helper
}
fun main(){
initializeWorld( worldFile: "Problem3-7.kwld")
// Create your robot objects here and tell them what to do!
var karel : Choreographer = Choreographer( st: 2, ave: 5, North, beepers: 7)
}
// You don't need to change anything below.
fun initializeWorld(worldFile:String="", delay:Int=50)
{
if (!worldFile.isEmpty())
{
if ("windows" in System.getProperty("
os.name").lowercase()){
World.readWorld( filename: "worldFiles\l"+ worldFile)
Re - do Problem 3 - 7 with a Choreographer and 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!