Classes and Objects Reflection

I did the Birthday list class. Here is my code:

I first define my class, which is Birthday_List, then my field variables, name and birthday. After that I initialised the parameters inName and inBirthday then assigned with inName/inBirthday. I then made two methods. The first one returns, and the second one returns self.birthday. Afterwards I assigned the variables inName and inBirthday as inputs so the user can input their name and birthday. Then I made a variable assigned to the class with the parameters inName and inBirthday. I then used the getName and getBirthday methods to print the users input. My last 2 lines are testers for printing just the name.

Leave a Reply

Your email address will not be published. Required fields are marked *