Object Oriented Programming: Class Farmer
Your project lead asked you to write a class Farmer for a videogame you are working on. The class should have the following data attributes:
Attributes:
_name -- a string
__mood -- an integer value
Methods:
• __init__ -- creates these attributes based on arguments passed into it
• __str__ -- gives all the information on an object.
• get_name -- returns the value of __name of the object
• get_mood -- returns the value of __mood of the object
• set_name -- assigns a value to the __name of the object
• set_mood -- assigns a value to the __name of the object
• talk to -- takes another object of the same class (another_farmer)
• If farmer mood is lower or equal to that of the another_farmer then add 1 to the mood attribute and display a positive message.
• If farmer mood is higher than that of another_farmer, decrease the mood of the farmer by 1 and display a negative message.
• The attributes of another_farmer do not change.
Save your class as farmer_class1.py
Test code: to test your class download this program into the same folder and run it: farmer test code.py
HINT: looking at the test code should help you understand how the class works.
Turn in your farmer_class1.py here.
Start Assignment
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme