English subtitles

← Average Mileage - Intro to Java Programming

Get Embed Code
6 Languages

Showing Revision 4 created 05/24/2016 by Udacity Robot.

  1. Your task was to write the average method that computes the average of a bunch
  2. of fuel efficiencies. Now, of course that's almost exactly the same as
  3. computing the average of a bunch of areas. So let's copy and paste this code.
  4. And there are only two spots where I need to fix it up. Over here instead of
  5. country, it should say car. And over here instead of calling getArea, I should
  6. call getFuelEfficiency. And that's all. This is, of course, intensely boring,
  7. and there ought to be a better way.