Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Implement a python constructor that accepts one parameter: age (type integer). This parameter should initialize the similarly named class instance variable (these would start with
Implement a python constructor that accepts one parameter: age (type integer). This parameter should initialize the similarly named class instance variable (these would start with self. )
Implement a python method named sayHello. This python method should accept a single argument: name (type string). The result of this method should print the line
Hello, XXXX! Haven't seen you for YYYY years!
Where XXXX is the name supplied in the argument and YYYY is the class instance variable storing age, the one supplied during construction of the object.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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