View the step-by-step solution to:

We've been talking about abstraction and ADT's (Abstract Data Types), Using the ADT defined below, create a homegrown string data type. These are the...

We've been talking about abstraction and ADT's (Abstract Data Types), Using the ADT defined below, create a homegrown string data type. These are the deliverables that must be supplied:

The code implementing the ADT.

A simple program to prove that it works.



The only additional restriction I'll put on you is that you must use a simple array of characters to store the values. Remember, don't get carried away. Create a simple and useable design.

ADT: string

============================================================

Domain: the local character set (for this exercise, ASCII will be fine)...

the letters: A...Z and a...z

the digits: 0...9

other symbols: the usual punctualion marks and mathematical symbols

Operations:

Construct an empty string

Construct an initialized string

Assign a new value to a string

Append new values on the end of an existing string

Display the contents of a string

Relational Operations:

Equal to is true if two string are the same

Not equal to is true if two string are different

Less than is true if the first string is smaller than the second string

Less than/equal to true if the first string is either the same as or smaller than the second string

Greater than true if the first string is larger than the second string

Greater than/equal to true if the first string is either the same as or larger than the second string

This question was asked on Apr 18, 2010.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors and customizable flashcards—available anywhere, anytime.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access or to earn money with our Marketplace.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
  • -

    Flashcards

    Browse existing sets or create your own using our digital flashcard system. A simple yet effective studying tool to help you earn the grade that you want!

    Browse Flashcards