Object model in Java: elements and application

https://doi.org/10.1016/S0950-5849(99)00002-6Get rights and content

Abstract

The Java programming language is a new object-oriented programming language that is gaining widespread popularity in the computer software industry because of its ease of learning, simplicity, generality, portability and networking capabilities. In this article, we discuss the semantic implementation in Java of each of the elements of the object model, identified by Booch [G. Booch, Object-Oriented Analysis and Design with Applications, 2nd Edition, Addison-Wesley, 1994], in addition to the mobility element. We show that Java, unlike other object-oriented languages, covers and simplifies all elements of the object model. An example illustrating those elements in Java will be drawn from a telecom software application.

Introduction

Java is a relatively new general purpose programming language introduced in 1996 by Sun Microsystems [2]. Java is object-oriented, portable, multithreaded, secure and easy to learn language. Being completely portable, a Java executable program can be run on various computer platforms without any modifications. A Java applet is a Java program that can be referred to in a hypertext-based web page. Then, once downloaded to a client web site, it is interpreted by the Java interpreter embedded in the client internet browser like Netscape and Microsoft's Internet Explorer.

The object-oriented programming paradigms is theoretically founded on the object model. A typical object-oriented software system implementation is centred around the dynamic creation, manipulation, storing and releasing of objects. Prior to the implementation, object-oriented analysis and design deal basically with the identification of the necessary objects and their interrelationships.

Many object-oriented languages have been introduced in the past, however none of them was fully object-oriented. A full-fledged object-oriented language is the one that addresses all the elements of the object model. Seven of these elements were identified by Booch [1] and are divided into major and minor elements. The major elements are: abstraction, modularity, encapsulation and hierarchy, and the minor elements are typing, concurrency and persistence. The study and comparison of object-oriented programming languages can be performed according to their implementations of the object model elements to which we added the object mobility as a minor element (cf. Fig. 1).

In this article, we study Java from the object model point of view. We also show, using an application example, the use of each concept of Java's object model elements. We will try, as much as possible, to describe the concepts of the object model using the Unified Modelling Language (UML) [3], an emerging internationally recognised standard for the specification and design modelling of object-oriented systems.

The rest of the article is organised as follows. Section 2 discusses each of the elements of the object model and their implementations in Java. Section 3 summarises the object model elements and compares three popular object-oriented languages with respect to that model. Section 4 illustrates the use of Java in telecom software engineering by considering a simple application example. Finally, Section 5 concludes the article and outlines some issues for future research.

Section snippets

Elements of the object model

As a result of the proliferation of object-oriented programming languages in the past ten years, a question arises: what makes a language truly object-oriented? Are there criteria set to measure the object-orientedness of a proposed language? Booch [1] proposed a seven-elements object model that can capture a full-fledged object-oriented language. We have adopted these model elements and added the object mobility and distribution element to the list of minor elements. In this section, we first

Summary and comparison

The Java programming language provides the syntax and semantic for supporting all the eight elements of the object model. Table 2 summarises Java's implementation of the object model elements.

Also, Java can be considered as a complete object-oriented programming language with respect to the object model elements. Table 3 shows a comparison of Java and two other popular object-oriented programming languages, C++, Smalltalk and Ada95 with respect to their implementation of the object model

Using Java object model in a telecom application

The power of the Java object model is exploited and illustrated in the following application example. This application involves two classes of human users (actors): Subscribers and Operators. In addition, auxiliary objects useful for the operation and management of the service are needed, namely, the Time Server and Coordinator objects.

Subscribers can access this telecom service on the internet and engage in a communication session. Operators can monitor the state of the service at any time and

Conclusion and future work

In this article, we have shown how Java supports all the elements of the object model, unlike the other object-oriented programming languages. Specifically, concurrency, persistence and mobility make Java a powerful and suitable language to be used for programming concurrent and distributed software systems, such as communications software, real-time controllers and internet-based distributed applications like electronic commerce systems [9]. We are currently working on mapping UML-based system

Acknowledgements

The author thanks the anonymous referees for their suggestions that helped improve this article. Also, the author would like to acknowledge the support of this work by a Kuwait University Research Administration Grant EE107.

References (9)

  • G. Booch

    Object-Oriented Analysis and Design with Applications

    (1994)
  • K. Arnold et al.

    The Java Programming Language

    (1998)
  • M. Fowler et al.

    UML Distilled, Object Technology Series

    (1998)
  • D. Lea

    Concurrent Programming in Java – Design Principles and Patterns

    (1997)
There are more references available in the full text version of this article.

Cited by (0)

1

This work was done while on sabbatical leave in Canada.

View full text