LaunchCode Java CS50 Problem Set #5
Directory Notes:
- 'Greedy.java' (contains main) can be found in the src/main/java/com/xephorium/greedy directory.
LaunchCode Java CS50 Program #2
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.