Consider the following Shape hierarchy and the user calling…
Consider the following Shape hierarchy and the user calling code in the main below: class Shape: def get_area(self) -> float: raise NotImplementedError(“bad”) class Square(Shape): def __init__(self, side_len: float) -> None: self._side_len = self._side_len def get_area(self) -> float: return self._side_len * self._side_len class Circle(Rectangle) def __init__(self, r: float) -> None: self._radius = r def main() -> None: shapez: list[Shape] = [ Square(4.1), Circle(2.4), Square(2.4) ] sorted_shapes = sorted(shapez) print(“here are the sorted shapes:”, sorted_shapes) main() Answer the following: A) Identify and provide suitable fixes for AT LEAST three bugs in this code. B) Does the Shape class as written above have a natural ordering? Say a few words why or why not. C) Does the Shape base class have a natural ordering? Say why or why not. Does the user calling code in the main suggest that it does? If so what?
Read DetailsThe following were key events that occurred during the Civil…
The following were key events that occurred during the Civil Rights movement of the 1950s-1960s: 1955–Rosa Parks refused to give up her bus seat to a white man in Montgomery, AL 1960–African Americans staged a sit-in at a lunch counter in Greensboro, NC 1965–Martin Luther King Jr. led a march from Selma to Montgomery, AL How did these events influence tactics used by some other minority groups?
Read Details