Q1. Modify the Array class (student files included) defined in this Lecture to make it behave more like Python’s list class. The solution must include the code that tests your modifications to the Array class and your result windows.
a. Add an instance variable logicalSize to the Array class. This variable is initially 0 and will track the number of items currently available to users of the array. Then add the method size() to the Array class. This method should return the array’s logical size. The method __len__ should still return the array’s capacity or physical size. Define some functions for manipulating linked structures. You should use the Node and TwoWayNode classes, as defined in the lecture notes. Create a tester module that contains your function definitions and your code for testing them.
Interfaces-Lecture AssignmentFollow the power point presentation to implement the following Interfaces:
arraybag.py to create ArrayBag
linkedbag.py to create LinkedBag
Use the testbag to test your ArrayBag and LinkedBag
Make sure you have a screen shot of your running testbag.
This assignment has been answered 6 times in private sessions.
© 2023 Codify Tutor. All rights reserved