More Related Content
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing PPTX
20171107 agile discussionコインws PPT
第1回(20170701)内容の振り返り(公開用) PDF
20120609 java oo道場(ネタのメモ) PDF
PDF
20120602 JavaOO道場 オブジェクト指向概論 PDF
PDF
Featured
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis... PDF
Storytelling For The Web: Integrate Storytelling in your Design Process PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR... PDF
2024 State of Marketing Report – by Hubspot PDF
Everything You Need To Know About ChatGPT PDF
PDF
Product Design Trends in 2024 | Teenage Engineerings PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health PDF
How to have difficult conversations PDF
ChatGPT and the Future of Work - Clark Boyd PDF
PEPSICO Presentation to CAGNY Conference Feb 2024 PPTX
How to Prepare For a Successful Job Search for 2024 PDF
Content Methodology: A Best Practices Report (Webinar) PDF
Getting into the tech field. what next PDF
5 Public speaking tips from TED - Visualized summary PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024 PDF
Social Media Marketing Trends 2024 // The Global Indie Insights PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf PDF
Introduction to Data Science 20170708 java oo道場(ネタのメモ)(公開用)
- 1.
Java & OO道場(その 2 )
(全 2 回)のメモ
2017 07 08‐ ‐ (土) by kowata
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
今日のネタ(その1)
Java の文法入門 OO入門
クラス・オブジェクト・インスタンス
継承・インタフェース・例外とか
デザインパターン
フレームワーク
テストの話 設計の話
アプリの話
業務・運用の話
(※) DB とかインフラの話とかは抜かしてます。
- 8.
- 9.
- 10.
- 11.
「インタフェース」についてのコーディング
(その 1 )
実装させる
●5つのクラス(及びインタフェース)「 Drivable 」「
Racable 」
「 Cycle 」 「 Train 」「 TestIFMain 」があります。
⇒ 「 http://bit.ly/KCuFPj 」にコードがあります。
問1.「 TestIFMain 」クラスの1つ目のコメントアウトを解除して
下さい
⇒ 「 Cycle 」クラスが「 Drivable 」インタフェースを実装す
るように
修正して下さい
main()
TestIFMain
start()
turn()
Cycle
uses
start()
<Drivable>
start()
stop()
Train
start()
<Racable>
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
例外について(処理方法)
(参考)「 Java 言語プログラミングレッスン下巻」
「達人プログラマー」「 Java の格言」
● 「 try ~ catch 」して処理する
● 「 throws 」で呼び出し元に処理を任せる
⇒ いずれにせよ「例外は例外発生時のみの処理とする」の
が重要!
∵例外発生時以外の処理を含めると、「ホントに例外か?」という状
況に。。。
(そもそも「例外」なんて無いに越したことは無い)
「例外による脱出口が沢山ある」=「メソッドからの返り値が複
数ある」
という事に繋がりかねず、設計が複雑になってしまう(シンプル
さ、重要!)
(個人的経験としては「例外」についてのポリシーがイケてないシ
ステムは、
- 20.