The java code for a currency convertor(pounds to dollars):
package com.example.currencyconverter;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
    
public class MainActivity extends AppCompatActivity {
    public void convert(View view){
      Log.i("info", "button works!");
      EditText editText = findViewById(R.id.editText);
      String amtInPounds = editText.getText().toString();
      double amtInPoundsDouble = Double.parseDouble(amtInPounds);
      double amtInDollarDouble = amtInPoundsDouble * 1.3;
      String amtInDollarString = Double.toString(amtInDollarDouble);
         Log.i("info", amtInDollarString);
         
     }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}
logcat Error:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.currencyconverter, PID: 7262
