This program is compiling well but message box says there were build errors. Please anyone can explain the reason.
using System;
public class CreateStudent
{
public static void Main()
{
Student oneSophomore = new Student();
oneSophomore.SetId(951);
oneSophomore.SetName("Ross");
oneSophomore.SetGPA(3.5);
Console.WriteLine
("The student named {0} has ID # is {1} and a gpa of {2}",
oneSophomore.GetName(), oneSophomore.GetId(), oneSophomore.GetGPA());
Console.ReadLine();
}
}
class Student
{
private int idNumber;
private string lastName;
private double gradePointAverage;
public int GetId()
{
return idNumber;
}
public void SetId(int id)
{
idNumber = id;
}
public int GetName()
{
return lastName;
}
public void SetName(string name)
{
lastName = name;
}
public double GetGPA();
{
return gradePointAverage;
}
public void SetGPA(double gpa);
{
gradePointAverage = gpa;
}
}
//The student named Ross has ID # is 951 and a gpa of 3.5