enpoly enpoly enpoly ) 2) 2 C Java 2 6. Bertrand Meyer [] if person greeting() if person if Faculty of Informatics, Shizuoka University, Hamamatsu, Shizuoka, 432-80, Japan C Jone[2] 2. Java Anchor Garden [3] Anchor Garden Anchor Garden c 203 Information Processing Society of Japan
if Squeak[4] C Java C Java Squeak Basem BlueJ[5] [6] BlueJ Kolling Kolling BlueJ BlueJ Tarsem [7] Gestwicki JIVE [8] JIVE Java DebugInterface Ben-Ari Jeliot [9] Jeliot 3. enpoly 3. enpoly enpoly enpoly en- Polymorphism Poly enpoly Anchor Garden enpoly C Java 3.2 Anchor Garden Anchor Garden 2 3.2. enpoly c 203 Information Processing Society of Japan 2
2 Anchor Garden 3.2.2 Object cannot generate interface s object UML Unified Modeling Language 3.2.3 Anchor Garden Anchor Garden [3] 3.3 enpoly enpoly enpoly 3.3. enpoly Type, Variable, Object 3 Type * Variable Object enpoly 3 ( ) Type ( 2 ) Variable ( 3 ) Object ( 4 ) 3.3.2 4 ( ) ( 2 ) ( 3 ) ( 4 ) 3.3.3 enpoly Person Japanese 5 5 Person Japanese American * Type Extra c 203 Information Processing Society of Japan 3
3 6 7 4 4. enpoly 5 4. enpoly *2 enpoly Person Japanese American greeting() 6 3.3.4 enpoly 7 6/(2+) InfixExpression Object InfixExpression Expression InfixExpression s 4.2 enpoly Java Greeting.java *2 enpoly c 203 Information Processing Society of Japan 4
public class Greeting { 2 3 public static void main(string[] args){ 4 5 Person taro = new Japanese(" "); 6 Person tom = new American("Tom"); 7 8 taro.greeting(); 9 tom.greeting(); 0 } } 8 2 2 3 5 20 30 0 20 20 Tom Hello 2 Greeting.java 8 enpoly Person Japanese American Person Japanese American Person Japanese Japanese American American Japanese American Person Person Japanese Person Japanese American Person enpoly if 9 4.3 3 enpoly enpoly 4.3. 2 3 2 2 3 4.3.2 2 6 6 4.3.3 9 ( ) 5 ( 2 ) ( 3 ) c 203 Information Processing Society of Japan 5
3 2 3 level A 3 (IS, B3) 5 20 25(0) 35(0) B 0 3 (CS, B3) 5 5(8) 30(5) 25(0) C 0 3 (CS, B3) 5 5(2) 20(7) 25(6) D 0 3 (CS, B3) 5 5(5) 30(3) 25(2) E 0 3 (CS, B4) 5 5(6) 30(8) 25(3) F 0.5 (IS, B4) 5 20(0) 30(8) 4 2 3 level G 3 3 (CS, M2) 5 35 H 3 3 (CS, M2) 5 30 I 3 3 (IS, M2) 0 75 J 0 0 (CS, B4) 20 75 K 0 0 (CS, B4) 30 40 60 L 0 0 (CS, B4) 20 35 75 ( 4 ) ( 5 ) ( 6 ) [] 5 enpoly enpoly UML 4.3.4 Windows7 Professional 32bit Eclipse Java EE IDE for Web Developers. Version:Juno Service Release 5. 5. 3 4 level 2 2 3 3 0 enpoly enpoly B M CS ISCS IS enpoly level 3.67 2.75 enpoly 5.2 5.2. A 2 A Expression c 203 Information Processing Society of Japan 6
0 A C InfixExpression InfixExpression Number Number InfixExpression Number Number InfixExpression A Expression A Expression InfixExpression A Expression Number Expression InfixExpression getvalue()number InfixExpression Expression Number 0 2 getvalue() InfixExpression getvalue() Expression InfixExpression getvalue() 4 A Expression getvalue() InfixExpression Expression Number Expression enpoly getvalue() Number getvalue() InfixExpression getvalue() A 3 3 5.2.2 C 2 C A Expression InfixExpression Number getvalue() getvalue() C Expression enpoly getvalue() enpoly Expression C InfixExpression Expression enpoly C getvalue() Number Expression InfixExpression getvalue() enpoly getvalue() InfixExpression C InfixExpression Expression C enpoly 5.3 c 203 Information Processing Society of Japan 7
enpoly enpoly 6. enpoly 6. enpoly *3 enpoly enpoly enpoly enpoly 6.2 enpoly enpoly enpoly 7. enpoly enpoly 2 enpoly 6 6 5 enpoly AnchorGarden [] Bertrand Meyer[ ], [ ].:, ( ), 990 [2] John Minor Ross.: Polymorphism in decline?, Journal of Computing Sciences in Colleges, Vol.2, No.2, pp.328-334, 2005 [3]. Vol.50 No.0 pp.2396-2408, 2009 [4] Dan Ingalls, Ted Kaehlei, John Maloney, Scott wallance and Alan Kay.: Back to the Future: The Story of Squeak, A Practical Smalltalk Writtern in Itself, OOPSLA 97, pp.38-326, 997 [5] Michael Kolling, John Rosenberg.: Object first with Java and BlueJ, SIGCSE 00, pp.429, 2000 [6] Alkazemi.B.Y., & Grami.G.M.: Utilizing BlueJ to Teach Polymorphism in an Advanced Object-Oriented Programming Course, Journal of Information Technology Education, Vol., pp.27-28, 202 [7] Tarsem S. Purewal, Jr. and Chris Bennett.: A framework for teaching polymorphism using game programming, Journal of Computing Sciences inf Colleges Vol.22, No.2, pp.54-6, 2006 [8] Paul Gestwicki, Bharat Jayaraman,: Methodology and architecture of JIVE, SoftVis 05 Proceedings of the 2005 ACM symposium on Software visualization, pp.95-04, 2005 [9] Mordechai Ben-Ari, Roman Bednarik, Ronit B. Levy, Gil Ebel, Andres Moreno, Niko Myller, Erkki Sutinen: A decade of research and development on program animation: The Jeliot experience, Journal of Visual Languages and Computing, Vol. 22, No. 5, pp. 375-384, 20 *3 c 203 Information Processing Society of Japan 8
A. Greeting.java Tom Hello A. Greeting + main() : void..* Person + greeting() : void A.3 3 Calculator.java, RPN- Maker.java, BinaryTreeMaker.java 5+4*3-2/ 5+4*3-2/ = 5.0 2 Calculator.java, RPNMaker.java, BinaryTreeMaker.java A.3 Calculator + calculate() : void 0.. - root Expression Japanese American + greeting() : void + greeting() : void A Number InfixExpression 0.. 0.. A.2 2 Calculator.java, Split- String.java 5+4 5+4 = 9.0 2 Calculator.java, SplitString.java A.2 A 3 3 Calculator + calculate() : void 0.. - root Expression Number InfixExpression A 2 2 c 203 Information Processing Society of Japan 9