Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi, in this assignment, need to complete the uncompleted program, and after that, the short question answer. in almost all program pages, have incompleted stuff.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

hi, in this assignment, need to complete the uncompleted program, and after that, the short question answer. in almost all program pages, have incompleted stuff. hope to get a good program running. thanks

Develop a Fixed-Size Array-List, with the given Python file A1B1.py . Students have learnt how the list is implemented with dynamic array (variable-length array) in our course. In this part, students are required to implement a Fixed-Size version of Array-List: We are not enlarging the list if it is full for adding more elements. GIVEN an uncompleted Fixed-Size Array-List in A1B1.py (based on the one in our lecture notes, - Complete this Fixed-Size Array-List with the Extra Operations below (methods of the class): - At least one line of simple comment for each extra operation required A1B2.py pass \# TO BE DONE BY STUDENT \# simple comment HERE def appendL (self, elt): pass \# TO BE DONE BY STUDENT \# simple comment HERE def searchFirstL (self, elt): pass \# TO BE DONE BY STUDENT \# simple comment HERE def clearL (self): pass \# TO BE DONE BY STUDENT def isEmptyL (self): \# Check if the list is empty or not return self. sizel( ==0 def isfullL (self): \# Check if the list is full or not return self.sizeL()==self. capacity def sizel (self): \# Return size of List (number of elements) neturn self. last * IMPORTANT: - TYPE your answers in a single document file. Then save the file in PDF format and submit to SOUL - Handwriting is NOT accepted - Add student information (student name, student id) at the top of the document Name your PDF file as IDSA_A1_>.pdf - e.g.,IDSA_A1_CHANSiuMing_20004016.pdf - Submission work not following requirements may be penalized or not be assessed. Questions: Answer the following questions based on your Python code developed in A1B1.py: (1) Describe in your own words the process of inserting a new element ' P ' into position 2 (i.e, elt=P and pos=2) of the following fixed-size array-list (No more than 100 words). (2) Describe the program's response if we try to insert another new element into position 3 of the above list after inserting element ' P ' (No more than 100 words)

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_2

Step: 3

blur-text-image_3

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

1. Have you ever taken any digital marketing courses?

Answered: 1 week ago