S
Schüler
Gast
Sers Leute ein letztes mal eine Aufgabe, dann bin ich soweit fertig
Könnt ihr mal die Richtigkeit prüfen pls.
Danke Leute
Könnt ihr mal die Richtigkeit prüfen pls.
Code:
Decide which data management object you would use and explain why. Please use one object out of the following list :
Array, Vector, HashMap, Properties, TreeMap.
a) At the beginning of the program 100 objects become loaded. These objects don’t change until the end of the program. These objects are displayed as a complete list 1000 times before they become deleted from memory. The type of the objects is equal.
b) At the beginning of the program 100 objects become loaded. These objects don’t change until the end of the program. 1000 times One object from this list will be searched and displayed. The object type is always String. The objects should be saved in a (basicly manually editable) text file.
c) At the beginning of the program 100 objects become loaded. These objects don’t change until the end of the program. 1000 times One object from this list will be searched and displayed. The type of the objects is different and not specified.
d) At the beginning of the program 100 objects become loaded. At runtime it can happen that up to 50 objects are added to this storage (and removed at a later time). These objects are displayed as a complete list 1000 times before they become deleted from memory. Average numbers of operations : 1000 display operations, 30 add/remove operations. The type of the objects is different and not specified.
e) At the beginning of the program 100 objects become loaded. At runtime it can happen that up to 50 objects are added to this storage (and removed at a later time). 1000 times One object from this list will be searched and displayed. Average numbers of operations : 1000 display operations, 30 add/remove operations. The type of the objects is different and not specified.
f) At the beginning of the program the object list is empty. At runtime it can happen that up to 50 objects are added to this storage (and removed at a later time). 1000 times One object from this list will be searched and displayed. Average numbers of operations : 1000 display operations, 30 add/remove operations. The type of the objects is different and not specified.
g) At the beginning of the program the object list is empty. At runtime it can happen that up to 50 objects are added to this storage (and removed at a later time). These objects are displayed as a complete list 1000 times before they become deleted from memory. Average numbers of operations : 1000 display operations, 30 add/remove operations. The type of the objects is always String.
h) At the beginning of the program the object list is empty. At runtime it can happen that up to 50 objects are added to this storage (and removed at a later time). These objects are displayed as a sorted complete list 1000 times before they become deleted from memory. Also about 1000 times an element from this list is searched and displayed. Average numbers of operations : 1000 display operations of complete sorted list, 1000 display operations of one object from the list, 50 add/remove operations. The type of the objects is always String.
Code:
a) Properties, da die Daten nie geändert werden und auch nur als ganzes ausgegeben
b) Array, die Daten ändern sich nicht, es werden auch nicht mehr. Auserdem ist die suche und ausgabe eines einzelnen Elementes hiermit am einfachsten
c) Vector, da beliebe Objekte
d) Properties, da immer als ganzes ausgegeben wird
e) Vektor
f) vektor
g) Properties
h) Vektor, da sortierte ausgabe
Danke Leute