Code Monkey home page Code Monkey logo

gettestiecollections's Introduction

GetTestieCollections

write some tests that exercise the Collections classes

create a project where you write 1 or 2 tests for each every one of these Collections classes. Figure out what the most common, most useful methods are, and use them in the test you write for the class. The class should be, say, TestHashMap, and then have a TestHasMap methid which uses the various methods you deem useful.

I've included two classes, Person and Address should you need a concrete class to supply to a generic structure. Feel free to use Integer and/or String as well.

Make tests for each of these:

  • For the Set interface, HashSet is the most commonly used implementation.
  • For the List interface, ArrayList is the most commonly used implementation.
  • For the Map interface, HashMap is the most commonly used implementation.
  • For the Queue interface, LinkedList is the most commonly used implementation.
  • For the Deque interface, ArrayDeque is the most commonly used implementation.

Also include a test for Vector,TreeMap, Stack, TreeSet, Iterator, PriorityQueue and Comparable.

So 12 Test in all, make sure you use the methods that most commonly describe why the data structure exists; e.g. for Stack be sure to use pop, push, peek and isEmpty.

Note: this is really only a series of tests that you are writing. All your code should go only in the Test portion of the project.

Note: import what you need to test all the classes mentions.

You may want/need a collection of code you've written that reminds you how to use a particular class.

gettestiecollections's People

Contributors

xt0fer 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.