Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 and 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 and 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:
approvedbreeds Mastiff "Chihuahua", "Corgi", "Shar Pei", "Beagle", "French Bulldog", "Pug", "Pointer"
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