Question: I need testing files which work with the functions of task 2 to 6 Verify that your Movie class code handles keys - i.e. accepts

I need testing files which work with the functions of task 2 to 6

  1. Verify that your Movie class code handles keys - i.e. accepts None appropriately.

  2. In the List class, complete the _linear_search method. (Note that this is a private helper method for the List class. Do not test it directly - it can be used in some of the methods that follow.)

  3. In the List class, complete the insert , append , and remove methods.

    Test List_array.py: Submit

    Results

  4. In the List class, complete the index , find , __contains__ , count , max , and min methods.

    Test List_array.py: Submit

    Results

  5. In the List class, complete the __getitem__ and __setitem__ methods.

    Test List_array.py: Submit

    Results

  6. Add the following functions to the PyDev module named utilities in your login_data_structures project.

    def array_to_list(llist, source): """ ------------------------------------------------------- Appends contests of source to llist. At finish, source is empty. Last element in source is at rear of llist, first element in source is at front of llist. Use: array_to_list(llist, source) ------------------------------------------------------- Parameters: llist - a List object (List) source - a Python list (list) Returns: None ------------------------------------------------------- """ def list_to_array(llist, target): """ ------------------------------------------------------- Removes contents of llist into target. At finish, llist is empty. Front element of llist is at front of target, rear element of llist is at rear of target. Use: list_to_array(llist, target) ------------------------------------------------------- Parameters: llist - a List object (List) target - a Python list (list) Returns: None ------------------------------------------------------- """ 

    Test utilities.py: Submit

    Results

  7. Add the following function to the PyDev module utilities.py in your login_data_structures project.

    def list_test(source): """ ------------------------------------------------------- Tests List implementation. The methods of List are tested for both empty and non-empty lists using the data in source Use: list_test(source) ------------------------------------------------------- Parameters: source - list of data (list of ?) Returns: None ------------------------------------------------------- """ lst = List() # tests for the List methods go here # print the results of the method calls and verify by hand return 

    Use Movie data from movies.txt to test your List code.

    Test utilities.py: Submit

    Results

If you want the list array function, please let me know

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!