• Home
  • Textbooks
  • The Essence of Data Structures Using C
  • Abstract data types (2): definitions, container and application data ADTs

The Essence of Data Structures Using C

Ken Brownsey

Chapter 3

Abstract data types (2): definitions, container and application data ADTs - all with Video Answers

Educators


Chapter Questions

Problem 1

Consider the remote control of a television set. Why is this like an abstract data type? List some typical operations with the input and output. How is this ADT implemented?

Check back soon!
01:01

Problem 2

Why is a good building subcontractor like an ADT?

rb
Rabia Bibi
Numerade Educator

Problem 3

Q_At_End, Go_To_Head, Insert_Before_Current, and Delete_Current in sequence.cpp/ $\mathrm{h}$ all need fixing.
(a) Work out a sensible order of implementation, so that you can test as you go along.
(b) For each function to be implemented use the specification to draw up a test plan and a design. Use diagrams where helpful. Then implement and test them.

Check back soon!
00:25

Problem 4

Using Find_Size as a guide, design and implement code for Print_All, specified as follows - a stub and silly message exists for this.
// PRE TRUE
// POST IF DB is not empty all values are printed to
$/ /$ screen
// ELSE message to say that DB is empty
void
Print_All (StudentDB_T DB)

Tanishq Gupta
Tanishq Gupta
Numerade Educator

Problem 5

ord_db. cpp is the main program for a simple database where the records are kept in key order. Well, it will be once you have fixed Add_Stud. From the specification draw up the test plan and design. Hint: look at Q_Present. Implement and test your Add_Stud function.

Check back soon!
01:23

Problem 6

ch $3 \backslash$ Examples $\backslash$ Numbers contains another application that uses ints as the Element_T for Sequence_T. Examine the code and see how only a small change is needed to sequence. $h$ to make Sequence_ $T$ use ints instead of KAPRec_Ts.

Rakesh Kumar Sharma
Rakesh Kumar Sharma
Numerade Educator