CS Homework Assignment 1 Solution

$30.00 $24.00

Arrays in Dart, Javascript, PHP, Python, and Rust An array is an aggregate data structure that is designed to store a group of objects. Most programming languages provide built-in support for arrays. In this homework assignment, you will compare the array data structures provided in five different programming languages: Dart, Javascript, PHP, Python, and Rust.…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Arrays in Dart, Javascript, PHP, Python, and Rust

An array is an aggregate data structure that is designed to store a group of objects. Most programming languages provide built-in support for arrays.

In this homework assignment, you will compare the array data structures provided in five different programming languages: Dart, Javascript, PHP, Python, and Rust. You will investigate how the following design issues are addressed in these programming languages:

1. What types are legal for subscripts?

2. Are subscripting expressions in element references range checked?

3. When are subscript ranges bound?

4. When does allocation take place?

5. Are ragged or rectangular multidimensional arrays allowed, or both?

6. Can array objects be initialized?

7. Are any kind of slices supported?

8. Which operators are provided?

For each design issue and for each language, explain the answer clearly by giving examples using code segments in these languages. You can illustrate the answers to these questions, in different parts of a single program. The example program must be complete. It should compile and execute on the dijkstra.cs.bilkent.edu.tr machine.

Finally,

1. Write a paragraph discussing, in your opinion, which language is the best for array operations, for various criteria. Explain why. (approx. 200 words, 5 points)
2. Write a separate section about your learning strategy in doing this homework assignment. 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. (approx. 500 words, 10 points)

Note that Python does not have built-in support for Arrays. On the other hand, the N-dimensional array (ndarray)of the numpy library can be used for working with arrays. Further information about ndarray can be found at https://numpy.org/doc/stable/reference/arrays.ndarray.html, and about the numpy library at https://numpy.org/doc/stable/.

Note: On the dijkstra machine, numpy library is installed in python3, only.

You can get detailed information about the Rust language at https://www.rust-lang.org/, and the Dart language at https://dart.dev/guides.

Submission:

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

1. A single file for Dart code: lastname_name_dart.dart

2. A single file for Javascript code: lastname_name_javascript.html

3. A single file for PHP code:lastname_name_php.php

4. A single file for Python code: lastname_name_python.py

5. A single file for Rust code: lastname_name_rust.rs

6. A single file for report: lastname_name_report.pdf

Your report should contain clear answers to each question for each language, corresponding example code segments and answers to additional questions.

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.

Suggestion:
Do not postpone the execution of your programs to the last minute! The dijkstra machine might be overloaded, then.

CS Homework Assignment 1 Solution
$30.00 $24.00