如何实现此界面并描述您的想法 [英] How to implement this interface and describe how you thinking
本文介绍了如何实现此界面并描述您的想法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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();
}
}
推荐答案
措辞表明这是您的作业.
设置作业是有原因的-帮助您学习.
放手一搏,它可能比您现在想的要容易.您的课程笔记或参考资料应向您显示如何进行操作.
如果遇到特定问题,请务必回来
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
了解实现接口的方法 ^ ]
Learn implementing interfaces here[^]
这篇关于如何实现此界面并描述您的想法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文