Wednesday, March 30, 2011

Nintendo Club Reward Point Generator

Patterns (CLASS)

Hello, I comment on this entry design patterns, which I understood, contains or can be implemented in my project.

First of all define what a design pattern.

"A design pattern is a solution to a design problem. For a solution is considered an employer must possess certain characteristics. One of them is that there must be proven effective in solving similar problems past. Another is to be reusable, which means that it is applicable to different design problems in different circumstances. "


Now, in the next picture is my class diagram, point out what I consider design patterns can be seen in my classes .




identify patterns that can be or are used and the Interpreter Iterator .

Defined by Wikipedia:
--------------- -------------------------------------------------- -------------------------------------------------- ---------------

"The Iterator design pattern defines an interface that declares methods for sequentially accessing a set of objects in a collection. Some of the methods that can be defined in the Iterator interface are:
First (), Next (), Hayman () and ElementoActual ()

This design pattern allows to cover a data structure without having to know the internal structure the same.

in java eg
"An iterator is the resource for travel collections. The iterator always knows where the next element. Some of you know where the previous item. I mean, who can recognize the library in both directions." -------------------------------------------------
-------------------------------------------------- -------------------------------

The Interpreter design pattern , is used to define a language for representing regular expressions that represent strings to look into other chains. Moreover, in general, to define a language to represent the different instances of a family of problems.

------------------------------------------------ -------------------------------------------------- --------------------------------


considered now explain why these patterns:

First,
Iterator Pattern
, because the products are stored in lists, for printing is to use an iterator that loops through las listas buscando información alojada y si la encuentra, la imprime a la pantalla.

El patrón Interpreter , es debido a que tuve que crear objetos que me reconocieran los tipos de datos enteros y flotantes y poder generar las listas de productos, y así pueda guardar e imprimir cadenas de datos.

Cualquier comentario o corrección es bien recibida, honestamente no le entendí muy bien a este tema.

Saludos

0 comments:

Post a Comment