//COPYRIGHT (c) 2014 FARSIGHT SYSTEMS CORPORATION - ALL RIGHTS RESERVED. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package fubar; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.*; /** * * @author Jeffrey Smith * @version 2014-03-18a-JDS */ public class Fubar1 { protected abstract class ShoppingCartItem { public abstract int getPrice(); } /** * @param args the command line arguments */ public static void main(String[] args) { List items; int sum; items = new ArrayList(4); sum = 0; for(ShoppingCartItem item : items) { sum += item.getPrice(); } } }