I want to find the average score of a LinkedList. My code is [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package bowlinggame; import java.util.LinkedList; import java.util.TreeSet; public class BowlingGame { public static void main(String[] args) { TreeSet <String>PlayerNames = new TreeSet<String>(); PlayerNames.add("Steve"); PlayerNames.add("James"); PlayerNames.add("Bob"); LinkedList <Integer>SteveScore = new LinkedList<Integer>(); SteveScore.add(205); SteveScore.add(240);//the average of these SteveScore.add(189); LinkedList <String>SteveDate = new LinkedList<String>(); SteveDate.add("07/12/2009"); SteveDate.add("08/01/2009"); SteveDate.add("02/27/2010"); LinkedList <Integer>JamesScore = new LinkedList<Integer>(); JamesScore.add(265); JamesScore.add(220);The average of these JamesScore.add(280); LinkedList <String>JamesDate = new LinkedList<String>(); JamesDate.add("05/24/2009"); JamesDate.add("08/07/2009"); JamesDate.add("09/18/2010"); LinkedList <Integer>BobScore = new LinkedList<Integer>(); BobScore.add(205); …

Member Avatar
Member Avatar
+1 forum 3

i have exception Conversion from string "System.Web.UI.WebControls.TextBo" to type 'Integer' is not valid. on these line [CODE] Dim no_single_room As Int32 = CType(DirectCast(dataItem.FindControl("txt_single"), TextBox).ToString(), Int32) Dim no_double_room As Int32 = CType(DirectCast(dataItem.FindControl("txt_double"), TextBox).ToString(), Int32) [/CODE]

Member Avatar
Member Avatar
+0 forum 2

The End.