Intermediate algorithms practical examples

Intermediate algorithms practical examples
0

#1

Hey everyone!

I completed the intermediate algorithms about month ago (wow that was tough) and I wanted a place to collect them all for future reference. Additionally, I didn’t really see any practical examples as to how they might work on a website. So I made one!

Hopefully this helps you if you’re like me and needed to see how all this web stuff ties together. Let me know what you think.

#2

IREL PBBY!

The cash register input fields look a little off and the output is not the easiest to read right away.
The other four look great.

It’s an awesome idea. Based on your personal web page I’m guessing you put this together pretty quick but with a little more time might be able to make it look really slick.

#3

For the Cash Register, to really simulate the challenge, you would need to be able to enter the cash-in-drawer for each denomination.

FYI - When I enter \$5.01 for price of item and \$5.00 for cash given, nothing happens when I click on the button.

#4

Thanks or the feedback, DZ and randell!

I had reworked the cash register thinking that it wouldn’t be sensical to have the user enter the entire cash-in-drawer for each transaction despite that being one of the original arguments for the challenge.

However, I totally agree that returning the change as the object in the function is confusing so I’ll keep working to tweak that.

#5

LBH EBPX QHQR!

#6

The other approach would be to at least show the user what the starting cash-in-drawer looks like which makes up the \$350.41, so they can understand why they get back the change they do. What would really be cool, is if you show the original cash drawer with images of each denomination and a quantity and then after the transaction, show the new drawer amounts.

Even better, do not allow the cash-in-drawer to reset to \$350.41 for each transaction. At some point, the cash-in-drawer could be empty depending on the transactions entered. I would also have a “reset” cash-in-drawer to take it back to the original \$350.41.