Question: 1. (100 points) A programmer wants to create a python class to manage the content of a given data. constructor 1. The class has a

1. (100 points) A programmer wants to create a python class to manage the content of a given data. constructor 1. The class has a constructor, such that the user can create an instance from that class by passing an optional list type argument. This argument includes the list data. 2. Under __init__ function, the optional list argument will be assigned to member variable _loclist. The default value for _loclist is None. 3. Inside the __init__ block, a second class variable _loclist_int will be defined in order to store the integer values from the supplied _loclist content. a set functions 1. If _loclist was not assigned previously, i.e. at the time of object creation, then the user can assign a list to _loclist, by using class member function _setlist. Write the setlist function. 2. Finding the group of integers from the list loclist, is realized by the class member function _findint. This function does not have any parameters, however it searches the content of _loclist for any integers, and appends them to _loclist_int list. Write the findint function. get functions 1. Write the -get_list function. -get_list function prints the content of a given list, and returns that list. The value of the function parameter for the name of the list to be printed can be "loclist" or "loclist_int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
