[JAVA] A story about making a calculator to calculate the shell mound rate

Introduction

This time, I made a calculator to calculate the shell mound circle (shell mound rate) for free. I managed to get over 100 downloads, so I'd like to keep track of what I did.

Shell mound rate Siamese's expected monthly income of 10,000 yen and the average monthly income of the same generation of 350,000 yen are the prices that Siamese can experience. Example: Cocoa drink (Van Houten) 130 yen (Japanese yen) → 4,550 (shell mound) yen

Quoted from Syamu_game @ Wiki

Why i decided to make

One day, on the way home from a local drug store "Ah, I'm free. Yeah! Make an app for the first time in a long time!" I opened my computer, but I turned to the side street and saw re-editing unemployed at NicoNico. Then, in the video, there is a story called Kaizuka Rate. When I looked it up, I found that it was Japanese Yen x35, so I decided to make it immediately.

Collision point

For the time being, I decided to make a calculator that calculates the numbers put in it using EditText. From the Japanese yen to the Kaizuka yen, the problem occurred immediately! that is...

1. How do you do a small number ?!

I knew that a small number of calculations in Java could be done using Big Decimal, but I was quite troubled because I didn't know how to write it. By the way, I write this.

MainActivity.java


  BigDecimal k = new
                    BigDecimal(kaizuka.getText().toString());
            BigDecimal big3 = new BigDecimal("35");
            double j = k.divide(big3, 3, ROUND_HALF_UP).doubleValue();

2. Behavior when nothing is inserted

When I pressed the calculation button without entering anything, it was forcibly terminated, so I added ~~ I had it added ~~. (I can't do anything by myself as usual) Thank you very much.

MainActivity.java


 public void kaizuka(View view) {
 jpy = findViewById(R.id.jpy);
 //This is the operation when you press the calculation button without entering anything.
if(jpy.getText().toString().equals("")){
 Toast.makeText(this,"Just enter something.",Toast.LENGTH_SHORT).show();
 }else {
 BigInteger j = new BigInteger(jpy.getText().toString());
 BigInteger big3 = new BigInteger("35");
 double k = j.multiply(big3).doubleValue();

So what happened to me after the release

I haven't become a millionaire or a celebrity, but I've increased the number of followers by about 20. In addition, I was able to finally reach 100 downloads by spreading the acquaintances of Gugutasu and posting an introduction video to Nico Nico myself. Thanks to those who downloaded it! By the way, the introductory video was ranked 8th in the Nico Nico Engineering Department ranking for about 3 days.

Finally

I feel that making this app was a success for me. Thanks to this app, I feel that I was able to not only create topics, but also to meet various people and acquire various knowledge and skills. Thanks to the many people involved in this app! We look forward to your continued support of Kaizu Calc!

GitHub Repository Author's Google+ [Google+ for those who made various corrections (Tomohiro)](https://plus.google.com/u/0/+%E3%81%8B%E3%81%8A%E3%82% 8B% E3% 82% 93) Google+ of the person who spread (Amemaru) Install here

Recommended Posts

A story about making a calculator to calculate the shell mound rate
A story about making a Builder that inherits the Builder
A story about sending a pull request to MinGW to update the libgr version
A story about trying to operate JAVA File
The story of making a reverse proxy with ProxyServlet
A story about trying hard to decompile JAR files
A story about reducing memory consumption to 1/100 with find_in_batches
A story about introducing Evolutions into the Play Framework
A story about making catkin_make of rosjava compatible offline
A story about taking an HTTP trace using Charles to find out what requests the Java library is making to Slack
Create a method to return the tax rate in Java
A story about making Spring + Hibernate + MySQL apps replication compatible
A story about misunderstanding how to use java scanner (memo)
A note about the scope
The story of making a binding for libui, a GUI library for Ruby that is easy to install
A story about using the CoreImage framework to erase stains with Swift and implement a blur erase function
A story about hitting the League Of Legends API with JAVA
The story of making a communication type Othello game using Scala.
The story of making it possible to build a project that was built by Maven with Ant
How to operate IGV using socket communication, and the story of making a Ruby Gem using that method
A story about changing skills from COBOL cultivated for 5 years in the late 20s to a Web language
About the language to be learned
Make a language! (Making a simple calculator ②)
The story I wanted to unzip
A murmur about the utility class
Make a language! (Making a simple calculator ①)
[Rails] I learned about migration files! (Adding a column to the table)
A story about changing jobs from a Christian minister (apprentice) to a web engineer
The story of forgetting to close a file in Java and failing
The story of making a game launcher with automatic loading function [Java]
A story I was addicted to when testing the API using MockMVC
[Java small story] Monitor when a value is added to the List
I thought about the best way to create a ValueObject in Ruby
A story about converting character codes from UTF-8 to Shift-jis in Ruby
A story that was embarrassing to give anison file to the production environment