Question: using python UTCODUO Class Name: Farm Class Attribute: company name Name of the company the Farm belongs to. In this case, Orgo. Instance Attributes name
UTCODUO Class Name: Farm Class Attribute: company name Name of the company the Farm belongs to. In this case, Orgo. Instance Attributes name Name of the Farm owner Name of the Farm owner country Country the Farm is in size Size of the Farm in acres num of livestock Number of Livestock the Farm owns num of_workers (int) (int) (int) (int) (str) Number of workers the Farm employs assets Amount of assets the Farm owns compatible_livestock Types of Livestock the Farm is able to keep. More on the format below. Note: The format of compatible_livestock will satisfy the following rules: Must be all lower case Types of Livestock should be separated by semicolons Types of Livestock should be in ascending alphabetical order Replace with the bool None if the Farm has no compatible livestock Example: "deer;dog donkey,mule pig Description: Write a class called Farm with the above attributes. Write the appropriate methods to accomplish the following tasks: Method #1 Initializes the attributes in the sequence listed above. Method #2 Makes the instances of the Farm class sortable based on assets. Method #3 Checks if two instances of the Farm class are equal to each other. CS2316 - HOMEWORK 02: ORGO'S FARMS If a Farm has the same name and owner as another, then the two instances are equal to each other Method #4 When a Farm instance is called in the Python shell or printed, the name of the Farm should be returned
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
