Question: Define a name property for your Dog class. The name must be of type str and between 1 and 2 5 characters. Your _ _

Define a name property for your Dog class. The name must be of type str and between 1 and 25 characters. Your __init__ method should receive a default argument for name.
If the name is invalid, the setter method should print() "Name must be string between 1 and 25 characters."
Define a breed property for your Dog class. Your __init__ method should receive a default argument for breed.
If the breed is invalid, the setter method should print() "Breed must be in list of approved breeds." The breed must be in the following list of dog breeds:
approved_breeds =["Mastiff", "Chihuahua", "Corgi", "Shar Pei", "Beagle", "French Bulldog", "Pug", "Pointer"]

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!