Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help! I am programming in JavaScript. Thanks! Question 1 100 pts Write a fake vector class. The class should use the built-in vector/list/array in

image text in transcribed

Please help! I am programming in JavaScript. Thanks!

Question 1 100 pts Write a fake vector class. The class should use the built-in vector/list/array in your language of choice to effectively "wrap" inside of it an existing vector, while presenting a limited vector-like functionality to the user. Here is a TypeScript interface that represents what your class should look like: interface Vector extends Iterable get(index: number) set(index: number, value: TD; Length: number; pushCvalue: T) popO: T insert(index: number, value: T); // remember to implement the iterable functionality If you are working in another language, you may translate this interface into a C# interface, Java interface, VB interface, or C++ pure virtual class, because the class you write must implement/inherit the interface/class that is shown above. If you are programming in raw JavaScript (ES6/ES2015), you cannot implement the interface, but you should carefully program your class to work identically to the presented interface. Please ensure you implement an iterator (or Enumerable, for C# programmers. You may use generators if your language supports them, or you may implement the iterator classes manually if you choose to do so. Question 1 100 pts Write a fake vector class. The class should use the built-in vector/list/array in your language of choice to effectively "wrap" inside of it an existing vector, while presenting a limited vector-like functionality to the user. Here is a TypeScript interface that represents what your class should look like: interface Vector extends Iterable get(index: number) set(index: number, value: TD; Length: number; pushCvalue: T) popO: T insert(index: number, value: T); // remember to implement the iterable functionality If you are working in another language, you may translate this interface into a C# interface, Java interface, VB interface, or C++ pure virtual class, because the class you write must implement/inherit the interface/class that is shown above. If you are programming in raw JavaScript (ES6/ES2015), you cannot implement the interface, but you should carefully program your class to work identically to the presented interface. Please ensure you implement an iterator (or Enumerable, for C# programmers. You may use generators if your language supports them, or you may implement the iterator classes manually if you choose to do so

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago