Question: Full name: ONID (e... wagstaf): CS 161- Functions: Composition Assume that you have access to the following functions from a C++ library that controls a

 Full name: ONID (e... wagstaf): CS 161- Functions: Composition Assume that

Full name: ONID (e... wagstaf): CS 161- Functions: Composition Assume that you have access to the following functions from a C++ library that controls a Mars rover: Float measure wind speed(); /* Measure current wind speed in knots int count rocks (float min size); Number of rocks in size void drive (int meters): 7Drive for the specified number of meters */ sure_Wireloat min D 1. Write a new function that drives for a total of 100 meters, printing out the wind speed every 10 meters along the way (including the start and end points). void sample_windspeed() 2. Write a new function that returns the average number of rocks seen at each waypoint along a 30-meter drive. Waypoints occur every 5 meters, and minimum rock size is a parameter. float survey_rocks (float min_rock_size)

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 Databases Questions!