Forums Register Login

Help Change Class Please

+Pie Number of slices to send: Send
Hello Members,
I would like to find out if anyone is nice enough to help me remove the ArrayList class from this code completely and replace it with something else that is not either of the following:

HashSet, LinkedHashSet, TreeSet, ArrayList, LinkedList, HashMap, TreeMap, LinkedHashMap, WeakHashMap, IdentityHashMap, Arrays, Collections, Hashtable, Vector

+Pie Number of slices to send: Send
Sure, there are plenty of people here that are willing to help you. However, most of the regulars here are not willing to do it for you. With that said, it looks like your list pretty much rules out the whole built-in Collections Framework. So why can't you use the standard Collections? And what ARE you allowed to use? If this is for a class, then I suspect you are supposed to write your own basic implementation of some data structure. We will be able to help you more if you give us some details about what you are trying to do and what restrictions are given on the homework assignment.

Regards,

Layne
+Pie Number of slices to send: Send

Restrictions

You are expected to implement the data structures from scratch. Specifically you are not allowed to use the following classes from the java.util package :

HashSet, LinkedHashSet, TreeSet, ArrayList, LinkedList, HashMap, TreeMap, LinkedHashMap, WeakHashMap, IdentityHashMap, Arrays, Collections, Hashtable, Vector

You are allowed to implement any of the interfaces found within the Java Collections Framework such as Iterator, Enumeration,Comparable,List, Map etc


This code was not given to us but done by a friend of mine. I am basically useless at Java and cannot write it, but can roughly understand it!
+Pie Number of slices to send: Send
You should learn about simple data structures like a linked list. I'm guessing that's the aim of the course so most likely no one is going to implement it for you.
+Pie Number of slices to send: Send
Sorry if it was unclear, but I don't want anyone to do it for me - that would defeat the whole point of this module I am doing

I will look into linked lists!
+Pie Number of slices to send: Send
Hmmm... just read that I cannot use linked lists or arrays - what do I use then? :s
+Pie Number of slices to send: Send
Just found out I can use primitive arrays like:

array1[index]
+Pie Number of slices to send: Send
To clear things up when I mentioned using a linked list, I did not mean java.util.LinkedList class. I mean you should read up what a linked list is and write the linked list class yourself. They aren't too complicated. Just google for "linked list" and you will find many tutorials on how to create one. Good luck.
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1090 times.
Similar Threads
Exception -- java.lang.StackOverflowError
struct in java
Sudoku Solver
I am not getting the required output...
Question from jqplus
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:53:53.