Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fundamentals of Software Development 1Slide 1 Outline Designing a computational community for WordGamesDesigning a computational community for WordGames.

Similar presentations


Presentation on theme: "Fundamentals of Software Development 1Slide 1 Outline Designing a computational community for WordGamesDesigning a computational community for WordGames."— Presentation transcript:

1 Fundamentals of Software Development 1Slide 1 Outline Designing a computational community for WordGamesDesigning a computational community for WordGames –What are Word Games? –Communities: Transformers and ConnectionsTransformers and Connections User and the SystemUser and the System –Building a Transformer High level designHigh level design Low level designLow level design –Rules and Methods –Classes and Instances –Fields and Constructors } Next session

2 Fundamentals of Software Development 1Slide 2 Word Games: Transformers Our system will have many transformers likeOur system will have many transformers like –Pig Latin Hello  ello-HayHello  ello-Hay How have you been?  ow-Hay ave-hay ou-yay een-bay?How have you been?  ow-Hay ave-hay ou-yay een-bay? –Ubby Dubby Hello => HubbellubboHello => Hubbellubbo How have you been? => Hubbow hubbave yubbou bubbeen?How have you been? => Hubbow hubbave yubbou bubbeen? –Capitalizers: “HELLO” –Name Droppers: (“Maria says Hello”, “Rumi says Hello”) –And more, e.g: Combiner: Listen and combine two inputs into oneCombiner: Listen and combine two inputs into one Repeaters: Produce two outputs from oneRepeaters: Produce two outputs from one Delayers: Don’t produce anything until they are signaledDelayers: Don’t produce anything until they are signaled Network-senders: Move words from one computer to anotherNetwork-senders: Move words from one computer to another These transformers will be interconnectable modules like Legos! Download and run the WordGames demo WordGames demo

3 Fundamentals of Software Development 1Slide 3 Designing a Community What are the key questions for designing a computational community?What are the key questions for designing a computational community? –Determine the desired system behavior –Identify the entities –Specify entity interaction –Specify entity operation How to start?How to start? –Top-down: high-level and add details –Bottom-up: low-level details combine to form system –Today: in the middle, with a community of interacting transformers and connections

4 Fundamentals of Software Development 1Slide 4 A Community of Transformers and Connections Each Transformer is an entityEach Transformer is an entity –Transformer interactions, version 1 Read a word/phrase (from a connection)Read a word/phrase (from a connection) Write a word/phrase (to a connection)Write a word/phrase (to a connection) Each Connection is an entityEach Connection is an entity –Like tin-can telephones So Transformers don’t need to know about each otherSo Transformers don’t need to know about each other –Connection interactions Accept a word/phrase written to itAccept a word/phrase written to it Supply that word/phrase when requested (read)Supply that word/phrase when requested (read)

5 Fundamentals of Software Development 1Slide 5 Other Entities in the Community The UserThe User –User interactions Create a Transformer (of a specified type)Create a Transformer (of a specified type) Connect two Transformers (in a particular order)Connect two Transformers (in a particular order) How can we accomplish creating and connecting transformers?How can we accomplish creating and connecting transformers? Answer: Through a user interfaceAnswer: Through a user interface Along with modifications to the Transformer interactionsAlong with modifications to the Transformer interactions –User interface interactions Create a Transformer (of a specified type)Create a Transformer (of a specified type) Create a Connection between two TransformersCreate a Connection between two Transformers

6 Fundamentals of Software Development 1Slide 6 Transformer interactions, version 2 How do Transformers interact with other entities?How do Transformers interact with other entities? –Each Transformer has Connections Accept input Connection(s)Accept input Connection(s) Accept output Connection(s)Accept output Connection(s) –Communication Read word(s) (from a Connection)Read word(s) (from a Connection) Write word(s) (to a Connection)Write word(s) (to a Connection)

7 Fundamentals of Software Development 1Slide 7 Recap We have answered:We have answered: –System Behavior Allows a user to play various word gamesAllows a user to play various word games –Members of the community One instance of User and User interfaceOne instance of User and User interface Many instances of Transformers & ConnectionsMany instances of Transformers & Connections –Entity Interaction Read/write through connectionsRead/write through connections What is the remaining question?What is the remaining question? –Answer: Entity operation How does each entity work? What goes inside each one?How does each entity work? What goes inside each one? –For example: How do Transformers work? Is a Transformer a community (if so, of what?) or an instruction-follower? (See next slide.)

8 Fundamentals of Software Development 1Slide 8 Building a Transformer Transformer implementation must be able to:Transformer implementation must be able to: –Accept input Connection(s) –Accept output Connection(s) –Have its own instruction-follower that acts independently to: Read input, transform, write output Different types of transformers may do the transformation differentlyDifferent types of transformers may do the transformation differently Each Transformer is itself a community!Each Transformer is itself a community! –ConnectionAcceptors (input/output) E.g., acceptInputConnection: “store the input away someplace so that you can use it later”E.g., acceptInputConnection: “store the input away someplace so that you can use it later” –Entities that perform startup tasks when the Transformer is constructed –Independent instruction-follower We’ll focus on thisWe’ll focus on this

9 Fundamentals of Software Development 1Slide 9 Transformer Example: Capitalizer Capitalizer:Capitalizer: 1.Read the input 2.Produce a capitalized version of it 3.Write this as output Each Capitalizer does the same thing but with a different output based on its inputEach Capitalizer does the same thing but with a different output based on its input Hello GOODBYE HELLO Capitalizer 1 goodbye Capitalizer 2

10 Fundamentals of Software Development 1Slide 10 Transformer Example: NameDropper NameDropper:NameDropper: 1.Read the input 2.Produce a phrase containing its own name, the word “says,” and the input 3.Write this as output Each NameDropper has its own name to dropEach NameDropper has its own name to drop –All Capitalizers have the same instructions and same data –All NameDroppers have the same instructions and the same structure, but each has its own data associated with it (i.e., the name that it drops) Hello Rumi says Hello Maria says Hello Rumi Maria

11 Fundamentals of Software Development 1Slide 11 Other Transformer Examples Repeater:Repeater: 1.Read the input 2.Write this to one OutputConnection 3.Write this to the other OutputConnection PigLatin:PigLatin: 1.Read the input 2.Produce a new phrase containing all but the first letter, then the first letter, then “ay” 3.Write this as output

12 Fundamentals of Software Development 1Slide 12 Recap We have answered (at least partially):We have answered (at least partially): –System behavior? Allows a user to play various word gamesAllows a user to play various word games –Members of the community? (one) User interface and User, (many) Transformers, (many) Connections(one) User interface and User, (many) Transformers, (many) Connections –How do they interact? User operates user interface, which creates Transformers and ConnectionsUser operates user interface, which creates Transformers and Connections Transformers communicate through ConnectionsTransformers communicate through Connections –What goes inside a transformers: ConnectionAcceptors,... plus an instruction-follower with rules, such as for Capitalizer: 1.Read input 2.Produce capitalized version of it 3.Write output Next session: how to implement such rules!Next session: how to implement such rules!


Download ppt "Fundamentals of Software Development 1Slide 1 Outline Designing a computational community for WordGamesDesigning a computational community for WordGames."

Similar presentations


Ads by Google