Recruit
September 09, 2022
4.3k

見てわかるテスト駆動開発 / TDD Workshop

2022年度リクルート エンジニアコース新人研修の講義資料です

RecruitPRO

September 09, 2022

Transcript

7.  ࣍ͷ໨ඪΛߟ͑Δ  ͦͷ໨ඪΛࣔ͢ςετΛॻ͘  ͦͷςετΛ࣮ߦࣦͯ͠ഊͤ͞Δ 3FE   ໨తͷίʔυΛॻ͘

 Ͱॻ͍ͨςετΛ੒ޭͤ͞Δ (SFFO   ςετ͕௨Δ··ͰϦϑΝΫλϦϯάΛߦ͏ 3FGBDUPS   ̍ʙΛ܁Γฦ͢ 5%%ͷαΠΫϧ
8. Write a program that prints the numbers from 1 to

100. But for multiples of three print “Fizz” instead of the number and for the multiples of fi ve print “Buzz”. For numbers which are multiples of both three and fi ve print “FizzBuzz”. ͔Β·Ͱͷ਺ΛϓϦϯτ͢ΔϓϩάϥϜΛॻ͚ɻ ͨͩ͠ͷഒ਺ͷͱ͖͸਺ͷ୅ΘΓʹň'J[[ŉͱɺͷഒ ਺ͷͱ͖͸ň#V[[ŉͱϓϦϯτ͠ɺͱ྆ํͷഒ਺ͷ৔ ߹ʹ͸ň'J[[#V[[ŉͱϓϦϯτ͢Δ͜ͱɻ http://tickletux.wordpress.com/2007/01/24/using- fi zzbuzz-to- fi nd-developers-who-grok-coding/ http://www.aoky.net/articles/jeff_atwood/why_cant_programmers_program.htm σϞ'J[[#V[[໰୊ % &. 0

13. w ʮϨΨγʔίʔυͷδϨϯϚʯ w lίʔυΛมߋ͢ΔͨΊʹ͸ςετΛ੔උ͢Δඞཁ͕͋Δɻ ଟ͘ͷ৔߹ɺςετΛ੔උ͢ΔͨΊʹ͸ɺίʔυΛมߋ͢ Δඞཁ͕͋Δz w ϨΨγʔίʔυʹ৮ΔͨΊͷ   ޠኮͱٕ๏Λ੔ཧͨ͠ຊ

w TUBDLPWFS fl PXDPN͔Βͷ   ඃݴٴ਺ୈҐ IUUQTXXXBNB[PODPKQEQ ϨΨγʔίʔυվળΨΠυ