"

Introduction

This chapter explores abstraction and how it applies to algorithms, classes, and data structures.  Abstraction enables Java generics, which allows us to reuse code that would be essentially the same, save for the exact data type being used or stored.  Several Java data structures are explored, including Queues and Stacks.

 

Learning Objectives

  • Explain polymorphism as it is implemented in the Java Programming language
  • Introduce the comparable Interface
  • Describe the differences between an Interface and Abstract class

By the end of this chapter, you should be able to answer the following questions:

  • What is the purpose of abstraction?
  • How does abstraction support Object Oriented Programming?
  • Under what circumstances is it better to use an abstract class over an interface?
  • Under what circumstances is it better to use an interface over an abstract class?
definition

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Computer Science II Copyright © by Various is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.