method not overriding from superclass?
<p>The <code>onCreateOptionsMenu</code> override is giving me an error.  The code is supposed to read in an integer and either cube it or square it depending on the button pressed.  I was not getting an error before I put the logic in. Also the <code>onOptionsItemSelected</code> is giving me an error stating that it cannot resolve the method.  Thanks in advance for help! If you notice error in the logic id appreciate tips as well.</p>

<pre><code>package com.firstapp.conner.squareandcube;

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.TextView;



public class MainActivity extends AppCompatActivity {

    private static int squared, cubed;

    Button square, cube;
    TextView tv, inputNum;
    int num1;
    String numString;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);


        square = (Button) findViewById(R.id.square_button);
        cube = (Button) findViewById(R.id.cube_button);

        inputNum = (TextView) findViewById(R.id.editText);
        inputNum.setText(inputNum.getText());
        num1 = Integer.parseInt(inputNum.toString());

        tv = (TextView) findViewById(R.id.textView);

        Button square = (Button)findViewById(R.id.square_button);

        square.setOnClickListener(new View.OnClickListener() {
            @Override
             public void onClick(View v) {

                squared = num1 * num1;

                numString = String.valueOf(squared);
                tv.setText(numString);

                cube.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        cubed = num1 * num1 * num1;

                        numString = String.valueOf(cubed);
                        tv.setText(numString);
                    }
                });


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
});}}
</code></pre>