I've got some problem where I did know how to pass the value data.
for example in Activity1 :
I'm using method 
`int kalorivalue1 = calculateBreakfast(food1, drink1);
public int calculateBreakfast(int food1, int drink1) {
 return (int) (food1 + drink1);`

in Activity 2

```
 int kalorivalue2 = calculateLunch(food2 , drink2);
public int calculateLunch(int food2, int drink2) {
        return (int) (food2 + drink2);

```

in Activity 3
 >

```
 int kaloriValue3 = calculateDinner(food3, drink3);
public int calculateDinner(int food3, int drink3) {
        return (int) (food3 + drink3);

```

The problem is, how I want to calculate all = kaloriValue1 + kaloriValue2 + kaloriValue3 
under one NEW activity? do i have to use intent or the is some other way?
thank you in advance. your help are much appreciated. :)

```
package lynn.calculate.KaunterKalori;

import lynn.calculate.KaunterKalori.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
//import android.content.Intent;

public class Breakfast extends Activity {

    public int totalKalori;

    ArrayAdapter<String> FoodType1Adapter;
    ArrayAdapter<String> DrinkType1Adapter;
    String FoodTypeArray[] = { "nasi lemak", "roti canai",
            "Roti(2kpg-White Bread)", "nasi kerabu", "tosei", "nasi goreng" };
    int[] valueFoodTypeArray = { 389, 301, 140, 20, 1, 637 };
    String[] DrinkTypeArray = { "teh panas", "teh 0 panas", "teh tarik" };
    int[] valueDrinkTypeArray = { 201, 101, 51 };

    Spinner FoodTypeSpinner;
    Spinner DrinkTypeSpinner;
    TextView SarapanTotalKalori;

    public void onCreate(Bundle savedInstancesState) {
        super.onCreate(savedInstancesState);
        setContentView(R.layout.breakfast);

        FoodTypeSpinner = (Spinner) findViewById(R.id.spinner1);
        DrinkTypeSpinner = (Spinner) findViewById(R.id.spinner2);
        SarapanTotalKalori = (TextView) findViewById(R.id.JumlahKalori);

        initializeSpinnerAdapters();
        // load the default values for the spinners
        loadFoodValue1Range();
        loadDrinkValue1Range();

    }

    // nk handle button --> refer calculate button
    public void calculateClickHandler(View view) {
        if (view.getId() == R.id.button1) {

            // nk bace dkat spinner
            int food1 = getSelectedFood();
            int drink1 = getSelectedDrink();

            // kira kalori sarapan
            // view kalori sarapan

            int kaloriValue1 = calculateSarapan(food1, drink1);
            SarapanTotalKalori.setText(kaloriValue1 + "");
            totalKalori = kaloriValue1;
        //  Bundle extras = getIntent().getExtras();
            //if (extras != null) {
            //  int sarapanKalori = extras.getInt("kaloriValue1");
                //setCurrentSarapanKalori(kaloriValue1);
                //CurrentSarapanKalori();
            }
        }

        //Intent i= new Intent(this, CalculateAll.class);
        //i.putExtra("sarapanKalori", kaloriValue1);
    //}

    public int getSelectedFood() {
        String selectedFoodValue = (String) FoodTypeSpinner.getSelectedItem();
        int index = 0;

        for (int i = 0; i < FoodTypeArray.length; i++) {
            if (selectedFoodValue.equals(FoodTypeArray[i])) {
                index = i;
                break;
            }
        }
        return valueFoodTypeArray[index];
    }

    public int getSelectedDrink() {
        String selectedDrinkValue = (String) DrinkTypeSpinner.getSelectedItem();
        int index = 0;
        for (int i = 0; i < DrinkTypeArray.length; i++) {
            if (selectedDrinkValue.equals(DrinkTypeArray[i])) {
                index = i;
                break;
            }
        }
        return valueDrinkTypeArray[index];

    }

    public int calculateSarapan(int food1, int drink1) {
        return (int) (food1 + drink1);
    }

    public void loadFoodValue1Range() {
        FoodTypeSpinner.setAdapter(FoodType1Adapter);
        // set makanan b4 pilih
        FoodTypeSpinner.setSelection(FoodType1Adapter.getPosition("400"));

    }

    public void loadDrinkValue1Range() {
        DrinkTypeSpinner.setAdapter(DrinkType1Adapter);
        DrinkTypeSpinner.setSelection(DrinkType1Adapter.getPosition("77"));
    }

    public void initializeSpinnerAdapters() {

        FoodType1Adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, FoodTypeArray);

        DrinkType1Adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, DrinkTypeArray);

    }

}

```

this is one the activity, the other 2 activity are same just different variables, now I did not know how to calculate all the result under one new activity? thanks :D