Vol: 49(63) No: 3 / September 2004 A Guide to Implement Abstract Data Types in Java Programs Dorin Sima Department of Computer Science, University of Sibiu, Faculty of Engineering, Str Emil Cioran No. 4, Sibiu-2400, Romania, phone: ++40-269-216062, e-mail: dorin.sima@mcr.ro Keywords: abstract data types, algebraic specification, design patterns, JAX method, JUnit testing Abstract The term Abstract Data Types (ADT) denotes a collection of values and operations acting on those values. The meaning of values is independent of their particular representation, rather is derived from the relation between the values created by the operations. In the context of Object Oriented Programming Languages (OOPL), the ADT are very important: the objects that are manipulated in program are instances of ADT, that is an encapsulated data structure which can be only accessed by a set of specific operations that are specified in a public interface. The ADT can be specified in an informal way or, more precise, using algebraic axioms. One of the major advantages of a formal description is the simplification of the process of proving the correctness of an implementation of an ADT. In this paper we propose a methodology that can be used to implement the ADTs in an OOPL. We will show how to use JAX method and Bridge pattern to implement ADT in Java. References [1] Bloch J.-Effective Java Programming Language Guide, Ed. Teora, 2002 [2] Beck, K., Gamma E., - JUnit A Cookbook, http://JUnit.sourceforge.net/ [3] Clinger W –Object-Oriented Design, course notes, Northeastern University, www.ccs.neu.edu/course, 2001 [4] Gamma E – Design Patterns- Addison Wesley, Longman, 1995 [5] Guttag, J, Horowitz, Musser D.- Abstract Data Types and Software Validation - Communications of the ACM, vol. 21, No.12, pag. 1048, 1978 [6] Martin Robert – Object-Oriented Design Principle - www.objectmentor.com, 2002 [7] Stotts D. – The JAX Method of Systematic Test Case Generation for Java Software Development using JUnit, http://www.cs.unc.edu/~stotts/JAX/, 2002 [8] Turner J.l, McCluskey – The Construction of Formal Specifications: An Introduction to the Model-Based an Algebraic Approaches, 1992 |