Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Figury_polimorfizm
- {
- class Kolo : Figura
- {
- protected double r;
- public Kolo(double rr)
- {
- r = rr;
- }
- public override double Skaluj(double a)
- {
- return r *= a;
- }
- public override double Pole()
- {
- return 3.14 * r * r;
- }
- public override double Obwod()
- {
- return 2 * 3.14 * r;
- }
- public override void Wyswietl()
- {
- Console.WriteLine("Koło r = " + r);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement