ProgrammingPrinciples11
2THEGAMEOFLIFEExercises1
2DeterminebyhandcalculationwhatwillhappentoeachoftheconfigurationsshowninFigure1
1overthecourseoffivegenerations
[Suggestion:SetuptheLifeconfigurationonacheckerboard
Useonecolorofcheckersforlivingcellsinthecurrentgenerationandasecondcolortomarkthosethatwillbebornordieinthenextgeneration
]Answer(a)Figureremainsstable
(b)(c)(d)Figureisstable
12Chapter1_ProgrammingPrinciples(e)(f)Figurerepeatsitself
(g)(h)(i)Figurerepeatsitself
(j)(k)(l)Figurerepeatsitself
Section1
3_ProgrammingStyle31
3PROGRAMMINGSTYLEExercises1
Whatclasseswouldyoudefineinimplementingthefollowingprojects
Whatmethodswouldyourclassespossess
(a)Aprogramtostoretelephonenumbers
AnswerTheprogramcoulduseclassescalledPhone_bookandPerson
ThemethodsforaPhone_bookobjectwouldincludelo