Question: Question. A basic Map has methods size, isEmpty(), containsKey(),get(),put(),remove(),clear(),keySet(), and values(), 9 methods. The basic ST has 7 methods (not counting the constructor) listed here:

Question. A basic Map has methods size, isEmpty(), containsKey(),get(),put(),remove(),clear(),keySet(), and values(), 9 methods. The basic ST has 7 methods (not counting the constructor) listed here:

Question. A basic Map has methods size, isEmpty(), containsKey(),get(),put(),remove(),clear(),keySet(), and values(), 9

(a) Study each Map method in this order, and for each: i. give its method header ii. say which ST method is closest in action, its method header, and whether it is the same or if difffferent, how

(b) Finally, explain what methods dont match up. Explain how to work around any missing actions by use of the provided methods.

public class ST ST() void put(key key, Value val) Value va a[key] = val; a[key] Value get(key key) void delete(key key) boolean contains (Key key) boolean isEmpty() int size() Iterable keys() create a symbol table put key-value pair into the table (remove key from table if value is null) value paired with key null if key is absent) remove key (and its value) from table is there a value paired with key? is the table empty? number of key-value pairs in the table all the keys in the table API for a generic basic symbol table public class ST ST() void put(key key, Value val) Value va a[key] = val; a[key] Value get(key key) void delete(key key) boolean contains (Key key) boolean isEmpty() int size() Iterable keys() create a symbol table put key-value pair into the table (remove key from table if value is null) value paired with key null if key is absent) remove key (and its value) from table is there a value paired with key? is the table empty? number of key-value pairs in the table all the keys in the table API for a generic basic symbol table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!