public string Name {get; set;}
public int Age {get; set;}
Console.WriteLine("You entered an negative GPA, your value was defaulted to 0.");
public Student(string name, int age, double gpa)
public double ShowGPA(string strType)
double adj = _GPA * 1.15;
if (strType == "regular")
Console.WriteLine("Regular GPA:");
Console.WriteLine("Regular GPA:");
else if (strType == "adjusted")
Console.WriteLine("Adjusted GPA:");
Console.WriteLine("Adjusted GPA:");
else {Console.WriteLine("GPA:"); return _GPA;}
int namelength = Name.Length;
int sum = Age + namelength;
if (divfour > 0){Console.WriteLine("Lucky:"); return true;}
else{Console.WriteLine("Lucky"); return false;}
public static void Function(int i, ref double d)
Console.WriteLine("Entering CallFunction: i = {0}, d = {1}", i, d);
Console.WriteLine("Exiting CallFunction: i = {0}, d = {1}", i, d);
public static void Main()
Student Mary = new Student(strName, iAge, dGPA);
Console.WriteLine(Mary.ShowGPA("regular"));
Console.WriteLine(Mary.ShowGPA("adjusted"));
Console.WriteLine(Mary.LuckyDraw());
Console.WriteLine("=================");
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);
Function(iAge, ref dGPA);
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);