static void Main(string[] args) { var student = new Student("普通科の山田", 17); var vantanStudent = new VantanStudent("バンタンの田中", 16); student.IntroduceSelf(); student.Display(); Console.WriteLine(); vantanStudent.IntroduceSelf(); vantanStudent.Display(); Console.WriteLine(); vantanStudent.FreeMinutes += 2 * 60; vantanStudent.IntroduceSelf(); vantanStudent.Display(); }
static void Main(string[] args) { var vantanStudent = new VantanStudent(); var student = new Student(); vantanStudent.Name = "バンタンの田中"; vantanStudent.Age = 16; vantanStudent.GamePlayMinutes = 3 * 60; vantanStudent.FreeMinutes = 10 * 60; student.Name = "普通科の山田"; student.Age = 17; student.StudyMinutes = 2 * 60; student.FreeMinutes = 10 * 60; vantanStudent.IntroduceSelf(); vantanStudent.Display(); Console.WriteLine(); student.IntroduceSelf(); student.Display(); }