function Lab12()
% Make sure the following classdef files are in your
% working directory: Point, PointSet, Circle
% ShowPoint
% Manipulating Point Objects
close all

FinishedQ1 = 0;
FinishedQ2 = 0;
FinishedQ3 = 1;

if FinishedQ1
figure
plot([-5 5],[0 0],':k',[0 0],[-5 5],':k')
axis square
hold on
plot([-5 5],[-5 5],':m')
P = Point(-3,2);
Q = P.Reflect()
P.Show('r')
Q.Show('b')
end

if FinishedQ2
figure
plot([-5 5],[0 0],':k',[0 0],[-5 5],':k')
axis square
hold on

n = 20; x = -4.5+9*rand(n,1); y = -4.5+9*rand(n,1);
PS = PointSet(n,x,y);
PS.Show('b')
[P,Q] = PS.Diameter();
pause(1)
P.Show('r');
Q.Show('r');
plot([P.x Q.x],[P.y Q.y],'r')
end

if FinishedQ3
figure
plot([-5 5],[0 0],':k',[0 0],[-5 5],':k')
axis square
hold on

C1 = Circle(-2,3,1.5);
C1.Show('m')
C2 = Circle(1,2,2);
C2.Show('g')
C3 = Circle(2,2,.75);
C3.Show('r')
C4 = Circle(1,-1,.75);
C4.Show('b')

if C1.Nested(C2)
text(-3,-2.5,'Magenta and Green are nested')
else
text(-3,-2.5,'Magenta and Green are not nested.')
end
if C2.Nested(C3)
text(-3,-3,'Red and Green are nested')
else
text(-3,-3,'Red and Green are not nested.')
end
if C2.Nested(C4)
text(-3,-3.5,'Blue and Green are nested')
else
text(-3,-3.5,'Blue and Green are not nested.')
end
if C3.Nested(C2)
text(-3,-4,'Red and Green are nested')
else
text(-3,-4,'Red and Green are not nested.')
end
if C4.Nested(C2)
text(-3,-4.5,'Blue and Green are nested')
else
text(-3,-4.5,'Blue and Green are not nested.')
end

end