Skip to main content

2019 | Buch

Concise Guide to Object-Oriented Programming

An Accessible Approach Using Java

insite
SUCHEN

Über dieses Buch

This engaging textbook provides an accessible introduction to coding and the world of Object-Oriented (OO) programming, using Java as the illustrative programming language. Emphasis is placed on what is most helpful for the first-time coder, in order to develop and understand their knowledge and skills in a way that is relevant and practical. The examples presented in the text demonstrate how skills in OO programming can be used to create applications and programs that have real-world value in daily life.

Topics and features: presents an overview of programming and coding, a brief history of programming languages, and a concise introduction to programming in Java using BlueJ; discusses classes and objects, reviews various Java library objects and packages, and introduces the idea of the Application Programming Interface (API); highlights how OO design forms an essential role in producing a useful solution to a problem, and the importance of the concept of class polymorphism; examines what to do when code encounters an error condition, describing the exception handling mechanism and practical measures in defensive coding; investigates the work of arrays and collections, with a particular focus on fixed length arrays, the ArrayList, HashMap and HashSet; describes the basics of building a Graphical User Interface (GUI) using Swing, and the concept of a design pattern; outlines two complete applications, from conceptual design to implementation, illustrating the content covered by the rest of the book; provides code for all examples and projects at an associated website.

This concise guide is ideal for the novice approaching OO programming for the first time, whether they are a student of computer science embarking on a one-semester course in this area, or someone learning for the purpose of professional development or self-improvement. The text does not require any prior knowledge of coding, software engineering, OO, or mathematics.

Inhaltsverzeichnis

Frontmatter
Chapter 1. The Origins of Programming
Abstract
In this first chapter we explore what a programming language is, and something of the history of their development leading up to the Java language. This will help us understand some of the most basic terminology used in the process of creating programs.
Kingsley Sage
Chapter 2. Procedural Programming Basics in Java
Abstract
In Chap. 1 we learned some of the key concepts and terminology around programming. In this chapter it’s time to jump in and start to create our first programs in Java using the BlueJ Integrated Development Environment (IDE).
Kingsley Sage
Chapter 3. Getting into Object Oriented Programming
Abstract
In Chap. 1, we considered why OO has become such a cornerstone of modern software development. It helps us to develop programs in a structured manner that mirrors some real-world problem. In this chapter we expand on this core idea and see how we can reflect the real world using OO design, and then go on to create some simple multi class programs in Java.
Kingsley Sage
Chapter 4. Library Classes and Packages
Abstract
In this chapter, we delve into some of the rich pre-built code libraries that make Java a useful language for a wide range of applications. In truth, the libraries that exist as at version 8 of the language are so rich and varied that it is unlikely that many programmers, even experienced professionals, have an encyclopaedic knowledge of them all.
Kingsley Sage
Chapter 5. Modelling the World the Object Oriented Way
Abstract
As we have previously discussed, one of the reasons we build OO programs is because they allow us to produce code that provides a useful model of some real-world problem, using classes to represent entities in our problem domain. Up to now, each class has represented a disjoint entity, each with a clear and distinct purpose.
Kingsley Sage
Chapter 6. Dealing with Errors
Abstract
It is inevitable when producing any non-trivial software project that we will encounter errors, unexpected eventualities and erroneous data. This is just a fact of life and we need to develop strategies for dealing with it.
Kingsley Sage
Chapter 7. Deeper into Arrays and Collections
Abstract
In Chap. 4, we met the versatile ArrayList class and saw that it could be used to represent a collection of any Java type. In this chapter we delve deeper into the world of arrays and collections, and some of the algorithms that can support us in using them.
Kingsley Sage
Chapter 8. Adding a Graphical User Interface
Abstract
Up to now, we have built Java programs with solely text-based interfaces relying on features contained within BlueJ to create key objects and to call methods. Whilst this has helped us to develop our understanding of the Java language and the principles of programming, it is not how most applications are used in the real world.
Kingsley Sage
Chapter 9. Example Applications
Abstract
In this final chapter, we look at two examples of Java applications to consolidate the knowledge we have gained in this book. We consider a practical workflow for designing and developing an OO program to help us understand some of the broader software engineering issues associated with good coding.
Kingsley Sage
Backmatter
Metadaten
Titel
Concise Guide to Object-Oriented Programming
verfasst von
Dr. Kingsley Sage
Copyright-Jahr
2019
Electronic ISBN
978-3-030-13304-7
Print ISBN
978-3-030-13303-0
DOI
https://doi.org/10.1007/978-3-030-13304-7