C# Class
Zamti753Write 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.
- 9 years ago
- 20
Purchase the answer to view it
- wordcounter.doc
- jiju.txt
- output.png
- Jaisnssj
- what is 5t5=
- could you answer these for me please 6^(square root symbol with C underneath) 1/e = 1?x^5 16^5 = they're...
- Unit 9
- what are the customary units of solubility on solubility curves?
- Project Introduction
- where does the Sundiata epic come from?
- Write an exponential function to model the situation. Then estimate the value of the function after five years (to the...
- Social media Paper 350-700 words. Due today @7PM Eastern Time
- Operations and Project Management