6.03 - Shapes

Objetive
Using Visual Studio, create a project and the corresponding classes (using several files) for this classes diagram.

Resolution
using System;


namespace shapes
{
    class Circle:Shape
    {
        protected double radius;
    }
}

using System; namespace shapes { class Location { private double x, y; } }
using System; namespace shapes { class Rectangle:Shape { protected double side1, side2; } }
using System; namespace shapes { class Shape { protected Location c; public string ToString() { return ""; } public double Area() { return 0.000; } public double Perimeter() { return 0.000; } } }
using System; namespace shapes { class TestShape { static void Main(string[] args) { } } }

Popular Posts