Question: In pharo, for smalltalk: create a new class category through the System Browser called Pharo, and a new class called Smalltalk. Your smalltalk class will

In pharo, for smalltalk:

create a new class category through the System Browser called Pharo, and a new class called Smalltalk. Your smalltalk class will implement a rudimentary circular buffer. It must have the following methods and instance variables: - A method called bufferInit: that accepts an array of literals as an argument. - An instance variable called arr that is used to store the array object passed with the bufferInit: message. - A method called getElem: that accepts an integer as an argument. This integer is to be used as a circular index. Out-of-bounds indexes should correctly wrap around. This includes negative values! Remember that Smalltalk is 1-indexed. An argument of 1 should correctly return the first element, and an argument of 0 should return the last element.

Explain in step of code with comments and screenshots please of output

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!