IXD 2 Navigation: Project 1

Tip Calculator

Challenges

When coming up with what functionalities my tip calculator would provide the user, I decided to reference the tip function on a debt machine. Originally, I wanted the user to choose between an percent tip and specified amount. It was only after looking up how to pull data from radio buttons into Java, that I realized that if the user wanted to tip a specified amount, they would not need a calculator. Despite being a bit of a waste of time, taking out that function did work in my favour.

Another problem I encountered was trying to implement an animation into my calculator.

screen-shot-2017-02-06-at-11-29-23-am

In the last line of code above, I originally had “spin” instead of “rotate” when spin was actually the animation name. Because spin is not a class, Java could not find and execute the animation.

screen-shot-2017-02-06-at-11-30-17-am

I also originally forgot to integrate the “onclick=’start()'” into the button, meaning that the button did not activate the animation function.

screen-shot-2017-02-06-at-11-29-54-am

The final problem I encountered was a quick fix. I wasn’t sure how to round the answer to 2 decimal places. I ended up finding the answer on the stack Overflow forum. To solve the problem, I had to use the calculation shown above. “Math.round” rounds the answer to the nearest decimal place, so I had to multiply the answer my 100 in the round function and divided it again after.

Final Program

I decided to stick with a minimalistic design with a simple colour pallet and animation.

 

screen-shot-2017-02-06-at-11-53-30-am
When program is first started

 

Screen Shot 2017-02-06 at 11.58.32 AM.png
Button hover animation

 

 

 

screen-shot-2017-02-06-at-11-56-28-am
After calculation

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s