CS315 Assignment 1 Solved

30.00 $

Category: Tags: ,

Description

5/5 - (1 vote)

 

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-value

    pair

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)

Submission:

A single zip or rar file should be submitted containing the following files with given names:

1. A single file for report: lastname_name_report.pdf (65 Points)
2. A folder called, Codes. The contents of the folder will be as follows:

1 / 2 22.02.2021 19:42

CS 315: Homework Ass􏰀gnment 1 http://www.cs.b􏰀lkent.edu.tr/~guven􏰀r/courses/CS315/hw1.htm

1. A single file for Dart code: lastname_name.dart (5 points)
2. A single file for Javascript code: lastname_name.html (5 points) 3. A single file for Lua code: lastname_name.lua (5 points)
4. A single file for PHP code:lastname_name.php (5 points)
5. A single file for Python code: lastname_name.py (5 points)
6. A single file for Ruby code: lastname_name.rb (5 points)
7. A single file for Rust code: lastname_name.rs (5 points)

Please upload the zip or rar file you created to Moodle before the due date. Important Notes:

Late submissions will be accepted, with 10 points (out of 100) deduction for each extra day.

You may use the tutorials available in the Internet as a reference, but do not derive your example from the contents of the tutorials. If you do so, your programs may be similar to others in the class, that causes a disciplinary investigation.

Collaboration on the homework is not allowed.

2 / 2 22.02.2021 19:42

  • HW1-fphs5z.zip