Question: Question 4 (4 marks] The module SetOfInt is for a set of integers. Please answer the following questions related to making that module generic. a.

 Question 4 (4 marks] The module SetOfInt is for a set

Question 4 (4 marks] The module SetOfInt is for a set of integers. Please answer the following questions related to making that module generic. a. How would you change the specification to make it generic? (Specifically what changes would you make to the given specification. You don't need to redo the spec, just summarize what changes you would need to make.) b. What changes would you need to make to the Python implementation to make it generic for type T? (Again, you can describe and characterize the changes; you don't actually have to make them.) c. What relational operator needs to be defined for type T to be a valid choice? d. BONUS (1 mark) How would you specify (in the MIS) the relational operator constraint (from the previous question) on the generic type T? [Put your answer below. SS] a. b. c. d. (BONUS)

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!