Member Avatar

I have a few general questions about the Collections class in C#:" 1. Because all elements in an ArrayList are stored as objects do we need to cast them into their respective types before extracting? 2. Array lists are used if the size is adjusted accordinly to elements added and the types do not need to be defined, is this the only advantage over standard arrays? if not then what are some other advantages? 3. Apart from the reason for not knowing the size or types of data to be added, when would we use array lists over standard arrays? …

Member Avatar
+0 forum 2
Member Avatar

I'd like to add (using the mathematical term) two Integer ArrayLists in Java, as well as divide them and multiply. How would I go about this algorithmically? I can't for the life of me think of something, perhaps having to do with two's complements. Okay, so let's say that I have large integers that are put into an ArrayLists, so to start off like 1233 and 1245. How would I divide those two with ArrayLists? a.get(i)? I could easily do it with an integer or a long, but if it had thousands of digits, that wouldn't work so well. And …

Member Avatar
+0 forum 3
Member Avatar

My assignment: develop a limited application to track the statistics of sports players. For each player, track first and last name, points scored, assists made, and penalty rate. Design and implement an object capable of recording this info. Implement this object as Player. Must allow user to enter new player info for any number of players, store all the info for each player, and allow certain queries to be made on player stats. Application must prompt user to perform operations (Add, Remove, Show, Save, Quit). I have the most of the program completed. I have an issue with showing the …

Member Avatar
+0 forum 9
Member Avatar

Hi guys im having a lot of problems trying to code. I have opened a csv file and have read it using strings.I have splitted the strings by the ','. I want to load each of these values into a 2 dimensional array! but im having problems. Ultimatly i want to load all the values into an array and then sum the rows and find the averages. So far ive managed to get the values into an ArrayList. Ive tried converting the ArrayList to an Arry i keep runnig into problems. Any ideas or help at all would be helpful.Thank …

Member Avatar
+0 forum 8
Member Avatar

Hi Enclosed is my Java assignment which is due **Tuesday**, any help would be greatly appreciated. Program Specification: (1) Rather than having the trainee type in the full title of his Training Module, let him choose from a menu: the choices should be: “Forward Scanning Radar Display Repair”, “IR Beacon Maintenance” and “SAM Detection System Replacement”. I have not shown the menu output and user input in the example. Your program should display a menu with these three choices. (2) Allow more than one trainee’s marks to be entered, and then print the results for each trainee at the end …

Member Avatar
+0 forum 2
Member Avatar

Hello.. I'm new with java and have some problem with my assignment. I want to write a class named phoneBookEntry that has field for a person name and phone number. The class should have a constructor and appropriate accessor and mutator method. Then, write a main class that create five phoneBookEntry objects and store them in an arraylist. Use a loop to display the contents of each object in the arraylist. My problem is my code can't run properly. I dont know where is my fault. Is there anyone can check my code??? Please help me. Thank You This is …

Member Avatar
+0 forum 5
Member Avatar

I have the following problem and I dont undesratnd how to use arralists to implement. I have a customer class which I want to hold some primitive data types as name , id , address etc. To implement this using arraylists I must declare it as below? [CODE]Arraylist Customer =new Arraylist[150];[/CODE] One more question: I want to use arralists to hold accounts for a specific customer. How I am going to do this with arraylists also??

Member Avatar
+0 forum 10

The End.