Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with the blanks, and a program demonstration for b and c please. 11. [5] Fill in the blanks. a) One of the principles
Need help with the blanks, and a program demonstration for b and c please.
11. [5] Fill in the blanks. a) One of the principles of OOP is This principle enables us to define a general class (superclass) and later extend it to define more specialized classes (subclasses). b) Consider the following code fragment: ci - [1,2,3,4) c2 = [1,2,3,41 condition - (el is c2) What is the value of condition? c) The value of the expression (lambda a: lambda b: b**a+1)(2)(5) is d) The UML diagram below shows that GeometricObject is a of Rectangle. e) From the UML dingram below, we can conclude that the instance variables of Circle are Geometrie Object -color: str -filled: bool Geometricobject(color: str. filled bool) getColor: str setColor(color: str): None isFilled: bool set Filled(filled: bool): None stro: str 4 The color of the obye (default green Indicates whether the object is filled with a color (default: True) Crestes a Geometri cobject with the specified color and filled valus Returns the color Sets a new color Returns the filled property Sets filled property Returns a ring presentation of this object. Circe -radius: float Circle(radius: float. color: str. Filled: bool) getRadius: float setRadius(radius: float): None getArea: float get Perimeter: float Det Diameter: float print CircleO: Norte Rectangle -width: float -height: float Rectangle(width: float, height: float, color: string, filled: bool) getwidth: float setWidth(width: float): None GetHeight : float setHeight Chefght float): None getArea: float get Perimetert float Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started