Question: 1 ) Create a Date class. 1 a ) The class should have 3 properties ( instance variables ) : month day year 1 b

1) Create a Date class.
1a) The class should have 3 properties (instance variables):
month
day
year
1b) The class should have 2 actions (functions / methods) :
setDate()- allows the user to enter a date in 12/31/02 format
showDate()- displays the date.
2) Create an instance of the Date class.
3) Test the object's setDate() and showDate() methods.
4) Submit your program code, including the test run at the bottom of your code.
Hint: Click on the Classes and OOP under Content for this week and refer to Example 2
Save and submit it as p51.py

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 Programming Questions!