vehicles-api/src/main/java/com/udacity/vehicles/service/CarService.java
public List<Car> list() {
    long id;
    Location loc;
    List<Car> cars = repository.findAll();

    // Loop through the list to get and set the price and location
    for (Car aCar : cars) {
      id = aCar.getId();
      loc = aCar.getLocation();
      aCar.setPrice(priceClient.getPrice(id));
      aCar.setLocation(mapsClient.getAddress(loc));
    }
    return cars;
  }
/**
   * Gathers a list of all vehicles
   *
   * @return a list of all vehicles in the CarRepository
   */
Gathers a list of all vehicles
@return a list of all vehicles in the CarRepository
Gathers a list of all vehicles @return a list of all vehicles in the CarRepository
public List<Car> list() {
    long id;
    Location loc;
    List<Car> cars = repository.findAll();
    for (Car aCar : cars) {
      id = aCar.getId();
      loc = aCar.getLocation();
      aCar.setPrice(priceClient.getPrice(id));
      aCar.setLocation(mapsClient.getAddress(loc));
    }
    return cars;
  }
public List < Car > list ( ) { long id ; Location loc ; List < Car > cars = repository . findAll ( ) ; for ( Car aCar : cars ) { id = aCar . getId ( ) ; loc = aCar . getLocation ( ) ; aCar . setPrice ( priceClient . getPrice ( id ) ) ; aCar . setLocation ( mapsClient . getAddress ( loc ) ) ; } return cars ; }
Gathers a list of all vehicles
 @return a list of all vehicles in the CarRepository
Gathers a list of all vehicles @return a list of all vehicles in the CarRepository
// Loop through the list to get and set the price and location