1 / 9

自動販売機で考える MVC

自動販売機で考える MVC. Part1. ベンチャー体験工房1 グループ3 第1回 10月13日. デザインパターンとは?. 過去のソフトウェア設計者が発見し、編み出した設計ノウハウを蓄積し、名前をつけ、再利用しやすいようにカタログ化したもの。 今後学習予定のデザインパターン ・ MVC パターン ・ Observer パターン ・ Template Method パターン     ・     ・     ・ などなど. MVC とは. ソフトウェア設計モデルのひとつ データの管理を担う Model , 表示・出力を担う View

frey
Download Presentation

自動販売機で考える MVC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 自動販売機で考えるMVC Part1 ベンチャー体験工房1グループ3 第1回10月13日

  2. デザインパターンとは? • 過去のソフトウェア設計者が発見し、編み出した設計ノウハウを蓄積し、名前をつけ、再利用しやすいようにカタログ化したもの。 • 今後学習予定のデザインパターン ・MVCパターン ・Observerパターン ・Template Methodパターン     ・     ・     ・ などなど

  3. MVCとは • ソフトウェア設計モデルのひとつ • データの管理を担うModel , 表示・出力を担うView 入力内容を受け取り内容に応じてView、Modelを制御するControllerの3要素の組合わせで実装する方式

  4. 自動販売機の機能を考える • 自動販売機の機能を列挙してみよう。

  5. 自動販売機の機能を考える • 列挙した機能をグループ分けしてみよう! 制御系 表示系 データ系

  6. 自動販売機の機能を考える • グループ分けした機能に関数名をつけてみよう。 制御系 表示系 データ系

  7. 自動販売機の機能を考える • 実際に名前をつけた関数の処理を考えてみよう。 VendingMachineController.java VendingMachineView.java VendingMachineModel.java

  8. プログラミングに落とし込もう • 実際にMVCをプログラミングで書いてみよう!! • ファイル名は • Model : VendingMachineModel.java • View : VendingMachineView.java • Controller : VendingMachineController.java • App(Main): VendingMachineApp.java • 可能なかぎり綺麗に書く。 • 来週みんなでコードリーディングを行います。 • 自販機でのコインの入力はコンソールから行う。

  9. ヒント-JAVAでのコンソールの使い方 • Javaでのコンソールの使い方 サンプルコード 実行結果

More Related