Error when I try to compile : <p>constructor in Transcript in class Transcript cannot be applied to given types;
required: java. lang.String, java. lang. String, int, int
found: java. lang. String
reason: actual and formal arguments differ in length</p>

<p>I keep getting this error when I try to compile and have no idea how to fix it.</p>

<pre><code>import java.util.Scanner;

public class TestTranscript {
public static void main(String[] args) {
    Transcript t = new Transcript("student");
    t.promptPIN();
    t.printStudentInfo();
    t.promptGrades();
    t.printGrades();
    t.printAverage();

}
}
</code></pre>

<p>The program is in 2 files for an assignment.</p>

<pre><code>import java.util.Scanner;

public class Transcript{
private int PIN = 164892; //student's personal identification number
private int grade1;       //student's grades
private int grade2;
private int grade3;
private int grade4;
private int average;      //student's total grade average
private String name;      //student's full name
private String course;    //student's course
private int year;         //year student is attending

public Transcript(String name, String course, int year, int average)
{
    this.name = name;
    this.course = course;
    this.year = year;
    this.average = average;
}
    //getters
    public int getGrade1()
    {
        return grade1;
    }

    public int getGrade2()
    {
        return grade2;
    }

    public int getGrade3()
    {
        return grade3;
    }

    public int getGrade4()
    {
        return grade4;
    }

    //setters
    public void setGrade1(int grade)
    {
        this.grade1 = grade;
    }

    public void setGrade2(int grade)
    {
        this.grade2 = grade;
    }

    public void setGrade3(int grade)
    {
        this.grade3 = grade;
    }

    public void setGrade4(int grade)
    {
        this.grade4 = grade;
    }

public void printGrades(){
    //grade 1
    System.out.print("1st Grade: " + this.grade1 + " ");
    if (grade1 &lt; 101 &amp;&amp; grade1 &gt; 89) {
        System.out.println("A");
    } else if (grade1 &lt; 90 &amp;&amp; grade1 &gt; 79) {
        System.out.println("B");
    } else if (grade1 &lt; 80 &amp;&amp; grade1 &gt; 69) {
        System.out.println("C");
    } else if (grade1 &lt; 70 &amp;&amp; grade1 &gt; 59) {
        System.out.println("D");
    } else if (grade1 &lt; 60 &amp;&amp; grade1 &gt; 50) {
        System.out.println("E");
    } else if (grade1 &lt;50 &amp;&amp; grade1 &gt; 0) {
        System.out.println("F");
    }

    //grade 2
    System.out.print("2nd Grade: " + this.grade2 + " ");
    if (grade2 &lt; 101 &amp;&amp; grade2 &gt; 89) {
        System.out.println("A");
    } else if (grade2 &lt; 90 &amp;&amp; grade2 &gt; 79) {
        System.out.println("B");
    } else if (grade2 &lt; 80 &amp;&amp; grade2 &gt; 69) {
        System.out.println("C");
    } else if (grade2 &lt; 70 &amp;&amp; grade2 &gt; 59) {
        System.out.println("D");
    } else if (grade2 &lt; 60 &amp;&amp; grade2 &gt; 50) {
        System.out.println("E");
    } else if (grade2 &lt;50 &amp;&amp; grade2 &gt; 0) {
        System.out.println("F");
    }

    //grade 3
    System.out.print("3rd Grade: " + this.grade3 + " ");
    if (grade3 &lt; 101 &amp;&amp; grade3 &gt; 89) {
        System.out.println("A");
    } else if (grade3 &lt; 90 &amp;&amp; grade3 &gt; 79) {
        System.out.println("B");
    } else if (grade3 &lt; 80 &amp;&amp; grade3 &gt; 69) {
        System.out.println("C");
    } else if (grade3 &lt; 70 &amp;&amp; grade3 &gt; 59) {
        System.out.println("D");
    } else if (grade3 &lt; 60 &amp;&amp; grade3 &gt; 50) {
        System.out.println("E");
    } else if (grade3 &lt;50 &amp;&amp; grade3 &gt; 0) {
        System.out.println("F");
    }

    //grade 4
    System.out.print("4th Grade: " + this.grade4 + " ");
    if (grade4 &lt; 101 &amp;&amp; grade4 &gt; 89) {
        System.out.println("A");
    } else if (grade4 &lt; 90 &amp;&amp; grade4 &gt; 79) {
        System.out.println("B");
    } else if (grade4 &lt; 80 &amp;&amp; grade4 &gt; 69) {
        System.out.println("C");
    } else if (grade4 &lt; 70 &amp;&amp; grade4 &gt; 59) {
        System.out.println("D");
    } else if (grade4 &lt; 60 &amp;&amp; grade4 &gt; 50) {
        System.out.println("E");
    } else if (grade4 &lt;50 &amp;&amp; grade4 &gt; 0) {
        System.out.println("F");
    }

}

public void printStudentInfo() {    //prints student's information
    System.out.println("Student Information");
    System.out.println(name);       //prints student's name
    System.out.println(course);     //prints student's course
    System.out.println(average);    //prints student's grade average
    System.out.println(year);       //prints year of student's attendance
}

public void promptPIN() {
    Scanner sc = new Scanner(System.in);
    System.out.println("Enter PIN: ");
    while (sc.nextInt() != PIN) {
        System.out.print("Invalid PIN");
    }
}

public void promptGrades() {
    Scanner sc = new Scanner(System.in);
    System.out.println("Course 1: ");
    this.grade1 = sc.nextInt();
    System.out.println("Course 2: ");
    this.grade2 = sc.nextInt();
    System.out.println("Course 3: ");
    this.grade3 = sc.nextInt();
    System.out.println("Course 4: ");
    sc.close();
}

public void printAverage() {
    Scanner in = new Scanner(System.in);

    average = (grade1 + grade2 + grade3 + grade4)/4;
    System.out.println("Grade Average: " + average);
}

}
</code></pre>
