Lesson 3

1.1   Download and Open the SimpleCalc Project

1.1   Explore the layout

CODING CHALLENGE :

TASK2

2.1 Start and Run your app in debug mode

2.2 Debug a Running App

Task 3 Explore Debugger Features

Step Intro

Step Out

3.2 Work With Breakpoints

 

Breakpoint Icon changes into green

Enables to view all the breakpoints in app

3.2 Testing Apps With Unit Test

TASK1. Explore and run SimpleCalc in android studio

1.1 Explore Source sets and SimpleCalc

Open Project Calculator Test

Run calculator test

Process finished

In the Calculator Test class, change the assertion in addTwoNumbers

The test failed

Change back to the correct test

TASK 2. Add more unit tests to Calculator Test

2.1 Add more tests for the add() method

Add a new method, and success

Change (1d,1d) to (-1d, 2d) and change the assertion to (1d)

 

Add a new method for floating-points number

Error message detected

Change the AssertThat() method to the closeTo()

2.2 Add unit tests for the other calculation methods

3.3 Using The Android Support Libraries

Task 1. Set up your project to use support libraries

1.1   Verify that the Android Support Library is Available

Android Support Repository has been installed on my Android Studio

Set Up the project and examine build.gradle

Locate the dependencies section of buil.gradle

Update the library version

Sync Process

1.1   Add the layout and colors