Starting from:

$30

CS315 - Homework  - Assignment 1 - Solved

Associative Arrays in Dart, Javascript, Lua, PHP, Python, Ruby, and Rust
An associative array is an unordered collection of data elements that are indexed by an equal number of values, called keys. It may be called as map, hash or dictionary in different languages.

In this homework assignment, you will investigate the associative array data structures provided in seven different programming languages: Dart, Javascript, Lua, PHP, Python, Ruby and Rust. You will investigate how the following operations are done in these programming languages:

1.  Initialize

2.  Get the value for a given key

3.  Add a new element

4.  Remove an elemet

5.  Modify the value of an existing element

6.  Search for the existence of a key

7.  Search for the existence of a value

8.  Loop through an associative array, apply a function, called foo, which simply prints the key-valuepair

You can use online compiler/interpreters for this homework.

For each language, prepare a single source code file that examplifies and tests each operation, in the order given above. Your example programs must be different that the example code that may be available in the Internet.

Organize all of your experiments and their results and put them into a report. The report should include the following:

 For each language and for each operation, sample code segments and the results of their execution. You should explain what your example does, clearly. (45 points)

A section that includes your evaluation of these languages in terms of readability and writability of associative array data structure. Write a paragraph discussing, in your opinion, which language is the best for associative array operations. Explain why. (10 points)

  A section about your learning strategy. A learning strategy is an individual's approach to complete a task. In this section, discuss, in detail, the material and tools you used, experiments you performed. Also talk about personal communication, if you had. Give the URLs of the online compiler/interpreters you used to run your programs (10 points)

More products