Skip to main content
  • 945 Accesses

This chapter is an introduction to the construction of data structures in Ada using arrays, records and access types. Here we discuss the language support for implementing data structures; their encapsulation into abstract data types will be presented in the next chapter.

The case study is the implementation of a priority queue, first using arrays and then using pointers. A priority queue is a data structure that stores items so that retrieval of the item of the highest priority can be done efficiently, although insertion of new items may be less efficient. In the case study, we assume that the items are simply integers and that higher-priority items have lower values. This is a common situation: customers in a store take numbered tickets and the lowest outstanding number is served first.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag London Limited

About this chapter

Cite this chapter

(2009). Elementary Data Structures. In: Ben-Ari, M. (eds) Ada for Software Engineers (Second Edition with Ada 2005). Springer, London. https://doi.org/10.1007/978-1-84882-314-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-1-84882-314-3_5

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-84882-313-6

  • Online ISBN: 978-1-84882-314-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics