Write a program to test the new class

Assignment Help Basic Computer Science
Reference no: EM13978725

Write two interfaces, IWordStructure and IOrderedWordStructure.
IWordStructure should have the following methods:

a read-only property: numberOfWords that returns an integer
insertWord (string)

includesWord(string) and that returns a boolean
deleteWord(string) and return boolean indicating the success

IOrderedWordStructure should inherit from IWordStructure. It should have the following methods:

wordAt(nt) that returns the word at the index location
positionContains (string, int) returns a boolean

After writing the interfaces, create a collection class named StringCounter. It should implement the IOrderedWordStruture, mentioned above. It should have the following methods:
wordList, which returns an array containing the strings in the collection

CountEntry, which has three parameters. The first is a zero-based index indicating the position in the collection for which data is to be returned. The next two parameters are out mode. The first is used to return the string at the index position. The second is used to return the count for the string being returned in the second parameter.

These are additional requirements:

Use an array of structs to keep the data (the struct type should be like the one used in-class when writing the WordCount program; which is on the I: drive)(note : the file on the attachment )

The array should initially be able to hold 10 entries. Whenever the array fills up and additional locations are needed, allocate a new array twice the size of the one that is full, copy the entries in the old array to the new one, and let the old array be deallocated.

Write a program to test the new class. The class will be used in a late lab.

Attachment:- wordcountprogram.txt

Reference no: EM13978725

Draw signal constellations for binary psk and qpsk

Draw the signal constellations for binary PSK and QPSK modulation. Using the figure and the formula for binary PSK bit error probability Pb in AWGN, derive the Pb formula for

Structure stack that represents

Design a structure stack that represents a stack of elements of some arbitrary type. Include the functions: create(returns an empty stack), push(add an element to the top of

Prevent multimedia presentation software

1. "Communicate-don't decorate." This principle is one of 20 rules that graphic designer and educator Timothy Samara discusses in his 2007 book Design Elements: A Graphic St

Website is compatible with most browsers

Imagine that you are Web designer for a company of your choice (travel, bank, pet food, hair salon, high school, college, landscaper, retail store, etc.). Identify the compa

Design an algorithm to input n such temperatures

It is required to generate a histogram distribution for a set of daily average temperatures recorded in Antarctica. The temperatures are integer values in the range -40°C to

Location vacuum world under murphy law

Consider the accessible,two-location vacuum world under Murphy's Law. Show that for each initial state, there is a sequence of actions that is guaranteed to reach a goal sta

Features and components of commercial idps systems

Compare the functions, features and components of commercial IDPS systems. In writing your paper, use the classifications and descriptions you have learned from the reading

Software engineering process methods and tools

1. Describe the relationships among software engineering process methods and tools? 2. What are the primary advantages of the component based process model for Software engine


Write a Review

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd