Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading;
- using System.Linq;
- using System.Threading.Tasks;
- class Program
- {
- static void Main(string[] args)
- {
- Scool scool = new Scool();
- University university = new University();
- scool.Learn();
- university.Learn();
- Console.ReadLine();
- }
- }
- abstract class Education
- {
- public void Learn()
- {
- Enter();
- Study();
- PassExams();
- GetDocument();
- }
- public abstract void Enter();
- public abstract void Study();
- public virtual void PassExams()
- {
- Console.WriteLine("Сдаем выпускные экзамены");
- }
- public abstract void GetDocument();
- }
- class Scool : Education
- {
- public override void Enter()
- {
- Console.WriteLine("Идем в первый класс");
- }
- public override void Study()
- {
- Console.WriteLine("Посещаем уроки, делаем домашние задания");
- }
- public override void GetDocument()
- {
- Console.WriteLine("Получаем аттестат о среднем образовании");
- }
- }
- class University : Education
- {
- public override void Enter()
- {
- Console.WriteLine("Сдаем вступительные экзамены и поступаем в ВУЗ");
- }
- public override void Study()
- {
- Console.WriteLine("Посещаем лекции, проходим практику");
- }
- public override void PassExams()
- {
- Console.WriteLine("Сдаем экзамен по специальности");
- }
- public override void GetDocument()
- {
- Console.WriteLine("Получаем диплом о получении высшего образования");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement