Object Oriented Programming

Immutable Objects

This week’s post offers a review of theconcept of immutable classes, and suggestions for best practices inimplementation.  An immutable class is “aclass whose instances cannot be modified” (Bloch, 2018, p. 80) . There are many well-known immutable classes in the Java platformlibraries such as String and primitive classes like Integer and Double (Temre, 2015). To illustrateconsider …

Immutable Objects Read More »

Abstract Encapsulation

This article was originally written as part of a discussion with peers at Walden University.  It introduces the concepts of abstraction and encapsulation, subsequently offering illustrations as to how the concepts are used in software development. Abstraction is “the process of taking away or removing characteristics from something in order to reduce it to set …

Abstract Encapsulation Read More »

Abstract Classes and Interfaces

This post briefly describes the different roles played by abstract classesand interfaces in the Java programming environment.  An illustration is given for the use of aninterface, along with a justification as to why the interface approach is moreappropriate than using an abstract class. Anabstract class is a programming class with many of the same properties …

Abstract Classes and Interfaces Read More »