Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Thesaurus
{
    /// <summary>
    /// Represents a thesaurus.
    /// </summary>
    public interface IThesaurus
    {
        /// <summary>
        /// Adds the given synonyms to the thesaurus
        /// </summary>
        /// <param name="synonyms">The synonyms to add.</param>
        void AddSynonyms(IEnumerable<string> synonyms);

        /// <summary>
        /// Gets the synonyms for a given word.
        /// </summary>
        /// <param name="word">The word the synonyms of which to get.</param>
        /// <returns>A <see cref="string"/> with all synonyms for the given word.</returns>
        IEnumerable<string> GetSynonyms(string word);

        /// <summary>
        /// Gets all words from the thesaurus.
        /// </summary>
        /// <returns>An <see cref="IEnumerable<string>"/> containing
        /// all the words in the thesaurus.</returns>
        IEnumerable<string> GetWords();
    }
}
Posted
Comments
nagendrathecoder 7-Jan-15 7:05am    
What problems you are facing while implementing this interface? Please explain you question. Is this some homework or assignment?
Member 11358443 7-Jan-15 7:07am    
I got a test to do and the question is how to implement this interface in c#, and how I think.
nagendrathecoder 7-Jan-15 7:11am    
So this is assignment for you and you have to solve it rather then us.
If you getting any errors we can help you but no one would be interested in doing your homework.
Member 11358443 7-Jan-15 7:09am    
Iam new in c#, and know very little.
Member 11358443 7-Jan-15 7:12am    
In Which program should I implement this?

The wording suggests that this is your homework.

Homework is set for a reason - to help you learn.

Give it a go, it's probably easier than you think it is right now. Your course notes or references should be showing you how to go about it.

Do come back if you hit a specific problem
 
Share this answer
 
Comments
Praveen Kumar Upadhyay 7-Jan-15 7:11am    
Yes, Chill is right. You should better give a try first.
Learn implementing interfaces here[^]
 
Share this answer
 
Comments
CHill60 7-Jan-15 7:14am    
Good link - I also like the PluralSight course on Interfaces - which just happens to fit inside the free trial period :-)
BillWoodruff 7-Jan-15 7:55am    
Thanks for the mention of that course ! I will take a look.
CHill60 7-Jan-15 8:34am    
I did it recently and was quite impressed with the style of presentation and coverage of the subject

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900