3.6 Adding the App’s Logic
Class MainActivity
(Figs. 3.12–3.18) implements the Tip Calculator app’s logic. It calculates the tip and total bill amounts, then displays them in locale-specific currency format. To view the file, in the Project window, expand the app/Java/com.deitel.tipcalculator
node and double click MainActivity.java
. You’ll need to enter most of the code in Figs. 3.12–3.18.
3.6.1 package
and import
Statements
Figure 3.12 shows the package ...
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.