michalsimon
3/19/2016 - 10:13 AM

Abstract Class

Abstract Class

// an abstract method inside a class
public abstract class Student
{
	public abstract void outputDetails();
}

public class CollegeStudent : Student
{
	public string firstName;
	public string lastName;
	public string major;
	public double GPA;
	public override void outputDetails()
	{
		Console.WriteLine("Student " + firstName + " " + lastName + " enrolled in " + major + " is has a GPA of " + GPA);
	}
}