Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ООП
- {
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
- abstract class Vehicle
- {
- protected float Speed;
- public abstract void Move();
- public float GetCurrentSpeed()
- {
- return Speed;
- }
- }
- class Car : Vehicle
- {
- public override void Move()
- {
- Console.WriteLine("Машина двигается");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment