GithubHelp home page GithubHelp logo

greedy's Introduction

Greedy

LaunchCode Java CS50 Problem Set #5

Directory Notes:

  • 'Greedy.java' (contains main) can be found in the src/main/java/com/xephorium/greedy directory.

greedy's People

Contributors

xephorium avatar

Watchers

James Cloos avatar  avatar

greedy's Issues

Consider no setters on ChangeMaker

Hey Chris,

It took me a second to figure out the direction you were going with the prototypes and singletons. It wasn't my first thought, but it works! It's a fresh design. Also, props on doing the research to figure out prototypes.

Using ChangeMaker as a prototype is nice because you discard all the previous state with each new change dispense. One thing to consider would be to remove the setters from that class and make the object immutable. You did a great job using the constructor to populate the required information right from the start. Your code will be simpler if you just create a new ChangeMaker each time.

If you do go that route, I would also advise giving ChangeMaker a factory and removing the it from the spring configuration. You could put the ChangeMaker factory in Spring, but it wouldn't make sense to have both.

Cheers,
Mike

assertEquals

Hey Chris,

I really love the work you did with the unit tests. Great job really embracing TDD.

One small note would be to consider using assertEquals instead of assertTrue. assertEquals is definitely the "industry de facto" for tests. It also gives better output when a test fails (It says "expect 5, but got 2").

Tests look good.

Cheers,
Mike

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.