以下のようなコードで、フラグメントを用いたタブバーを作成していたところ、setFragment()
の部分5つすべてで赤い波線が引かれ、Runすると不適格であるとエラーが出てしまいました。
どうすれば治るのでしょうか。どなたか教えてくださると大変助かります。

package com.example.********.*******;

import android.app.Fragment;
import android.app.FragmentTransaction;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.FrameLayout;

public class MainActivity extends AppCompatActivity {

    private BottomNavigationView mMainNav;
    private FrameLayout mMainFrame;

    private QuizFragment quizFragment;
    private CertificationFragment certificationFragment;
    private SendFragment sendFragment;
    private TakephotoFragment takephotoFragment;
    private ConsequenceFragment consequenceFragment;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        mMainFrame = (FrameLayout) findViewById(R.id.main_frame);
        mMainNav = (BottomNavigationView) findViewById(R.id.main_nav);

        quizFragment = new QuizFragment();
        certificationFragment = new CertificationFragment();
        sendFragment = new SendFragment();
        takephotoFragment = new TakephotoFragment();
        consequenceFragment = new ConsequenceFragment();



        mMainNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {

                switch (item.getItemId()) {

                    case R.id.nav_quiz :
                        mMainNav.setItemBackgroundResource(R.color.colorPrimary);
                        setFragment(quizFragment);
                        return true;

                    case R.id.nav_certification:
                        mMainNav.setItemBackgroundResource(R.color.colorPrimary);
                        setFragment(certificationFragment);
                        return true;


                    case R.id.nav_send:
                        mMainNav.setItemBackgroundResource(R.color.colorPrimary);
                        setFragment(sendFragment);
                        return true;

                    case R.id.nav_takephoto:
                        mMainNav.setItemBackgroundResource(R.color.colorPrimary);
                        setFragment(takephotoFragment);
                        return true;

                    case R.id.nav_consequence:
                        mMainNav.setItemBackgroundResource(R.color.colorPrimary);
                        setFragment(consequenceFragment);

                        default:
                            return false;

                }


            }

            private void setFragment(Fragment fragment) {

                FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
                fragmentTransaction.replace(R.id.main_frame,fragment);
                fragmentTransaction.commit();


            }
        });


    }
}

ちなみに、こちらの動画を参考に作りました。
https://www.youtube.com/watch?v=EbcdMxAIr54&t=190s