0

Class Person OOP

https://code.sololearn.com/ca6A1729521a The yob and yod is not printed..I thought of removing the if condition and then what if I don't want to give yod as input and it will only print yob or sometimes I want to print them both and that's why didn't remove.

3rd May 2021, 7:07 PM
Ramisa Fariha
Ramisa Fariha - avatar
4 Answers
+ 2
In lines 42 and 43 you confused the parameters with the member variables. That means you just have to switch yob and Yob as well as yod and Yod
3rd May 2021, 8:34 PM
Hape
Hape - avatar
0
the question is 10.5 Implement a Person class. Each object of this class will represent a human being. Data members should include the person’s name, year of birth, and year of death. Include a default constructor, a destructor, access functions, and a print function.
3rd May 2021, 7:07 PM
Ramisa Fariha
Ramisa Fariha - avatar
0
Click the link again @Mirielle..I have corrected the link
3rd May 2021, 7:30 PM
Ramisa Fariha
Ramisa Fariha - avatar
0
@Hape thank you so much..It worked
3rd May 2021, 8:45 PM
Ramisa Fariha
Ramisa Fariha - avatar