Git Product home page Git Product logo

dictionary's Introduction

Dictionary, go fish Dictionary Create a program that lets users create a dictionary. Read through all the requirements below, then implement them one at a time:

Start with a class called Term, that has instance variables for word and definition. For example, Term.new('carrot', 'A delicious vegetable.'). In your user interface, build ways to create terms, list the words, show their definition, edit them, and delete them. As the dictionary gets bigger, it will be annoying to list out every single term. Instead, let users search for a word and get back the term: Term.search('carrot'). Don't just return the definition: return the entire object. This will make your program more extensible in the future. Sometimes a word has more than one definition. Add support for multiple definitions: Term.new('carrot', ['A delicious vegetable', 'The first ingredient in my favorite cake.']). Now do you see why it's a good idea to return the entire object from your search? Let's make our dictionary multilingual: allow multiple words for the same term. For example: Term.new(['carrot', 'zanahoria'], ['A delicious vegetable', 'The first ingredient in my favorite cake.']). These arrays are starting to feel very cumbersome. And if we want to support definitions in multiple languages, things would get complicated quickly. Let's create two new classes: Word and Definition. Each one will have an instance variable to store the actual word or definition, and another one to store which language the word or definition is in. For example, Word.new('zanahoria', 'spanish').

dictionary's People

Watchers

James Cloos avatar Josh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.