private string name {get; set;}
private int age {get; set;}
public Student(String nam, int age, double gpa){
public double ShowGPA(String strType){
if(strType.Equals("adjusted")){
if((this.GPA * 1.15) > 4)
else if(strType.Equals("regular"))
int sum = this.name.Length + (int)this.GPA;
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 st = new Student(strName, iAge, dGPA);
Console.WriteLine("Regular weighted GPA: " + st.ShowGPA("regular"));
Console.WriteLine("Adjusted GPA: " + st.ShowGPA("adjusted"));
Console.WriteLine("=================");
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);
Function(iAge, ref dGPA);
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);