Question: Write using Erlang Language Define a class with name ArrayAccess, this class has only one attribute, it is an integer type array with 100 elements.

Write using Erlang Language

Define a class with name ArrayAccess, this class has only one attribute, it is an integer type array with 100 elements. Define a constructor and four methods for ArrayAccess. Define a constructor. The constructor initializes the values of the array randomly. But the values are not bigger than 10000, not less than 0. Define three methods. The first method prints all values line by line by using traditional way ArrayName[index] to access each element. The second method print the addresses of all elements line by line. The third method filter out 0,100,1000,10000 and print their English names ZERO, One Hundred, One Thousand, Ten Thousand. Use JavaScript switch statement and for statement. Test your work by creating an object and calling each method.

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!