Question
/* 1. Read in the robosim.txt file Examples of reading files a line at a time are in session03 Create class call robot, include name
/* 1. Read in the robosim.txt file Examples of reading files a line at a time are in session03 Create class call robot, include name and location of the robot x,y create vector called robots, contains robot in each elements. create vector called beacons, contains beacon in each element for each line in the file beginning with "beacon", add a new beacon object to a list of beacons vector. for each line in the file beginning with "robot", add a new robot object to a list of robots vector. After the file is completely read first: 1) print a list of all the beacons (with name, x, y) 2) print a list of all the robots (with name, x, y) */ #include
// if (a == "beacon"){ // if (a == "robot"){ f.close(); }
==================================================================================================================
beacon b1 5 1 beacon b2 -3 3 beacon b3 -1 4 robot r1 1 2 robot r2 10 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started