Esempio n. 1
0
        public static void Main(string[] args)
        {
            // creates instance of People & Fee class
            Student user    = new Student();
            Fee     userFee = new Fee();

            Console.WriteLine("What is your name?");
            user.studentName = Console.ReadLine();

            Console.WriteLine("What is your CWID?");
            user.CWID = int.Parse(Console.ReadLine());

            Console.WriteLine("What is your major?");
            user.major = Console.ReadLine();

            Console.WriteLine("What is your GPA?");
            user.GPA = double.Parse(Console.ReadLine());

            Console.WriteLine("How many credits are you taking?");
            userFee.credits = int.Parse(Console.ReadLine());

            userFee.CalculateFee(userFee.credits);
            Console.WriteLine("Your tuition is {0:C} per semester.", userFee.tuition);
        }