Python - Object-Oriented Programming Foundations
You want to convert this procedural code into an object-oriented style. Which class design correctly encapsulates the data and behavior?
# Procedural code
def area_rectangle(width, height):
return width * height
w = 5
h = 3
print(area_rectangle(w, h))