0% found this document useful (0 votes)
21 views6 pages

On Abstraction: Making Recyclable Programs

This document discusses abstraction in programming and dividing programs into ideal components. It suggests programs can be divided into control, data, user interface, and algorithms sections. The example given is of a restaurant where orders are received, food is prepared by the chef, and served by the waiter matching the order. UML diagrams are also included showing interfaces for participants in a tic-tac-toe game making moves on a board.

Uploaded by

jeep2014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views6 pages

On Abstraction: Making Recyclable Programs

This document discusses abstraction in programming and dividing programs into ideal components. It suggests programs can be divided into control, data, user interface, and algorithms sections. The example given is of a restaurant where orders are received, food is prepared by the chef, and served by the waiter matching the order. UML diagrams are also included showing interfaces for participants in a tic-tac-toe game making moves on a board.

Uploaded by

jeep2014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

On Abstraction

Making Recyclable Programs


Ideal Program Division

Control,
Data
UI

Algorithms
Source:
Wikipedia
The restaurants client orders food

The chef receives orders and then


prepares them

and the waiter takes food matching


a clients order and serves it.
UML
<<Interface >>
Participant
----------------------------------------------
+ Position getMove(Player, TicTacToeBoard)

Human Computer
---------------------- ----------------------------------------------
- MoveEvaluation getMoveInternal(Player, TicTacToeBoard)
+ Player getOtherPlayer(Player)
+
MoveEvaluation
----------------------
+ Position bestPos
+ Player winner_when_minimize_opponent
UML

TicTacToeGame
-----------------------------------
- Participant player1
- Participant player 2
- TicTacToeBoard board

TicTacToeBoard <<Interface >>


----------------------------------- Participant
A lot of stuff. ----------------------------------------------
Ill spare that for now. + Position getMove(Player, TicTacToeBoard)

Human Computer
---------------------- ----------------------------------------------

You might also like