From 1c40a688e4bf215c9dace96eb599f524ff66e6f9 Mon Sep 17 00:00:00 2001 From: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Fri, 17 Apr 2026 00:04:42 -0400 Subject: [PATCH] Shape class in Playground --- SwiftyFox.playground/Contents.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SwiftyFox.playground/Contents.swift b/SwiftyFox.playground/Contents.swift index c8f4019..0017f4a 100644 --- a/SwiftyFox.playground/Contents.swift +++ b/SwiftyFox.playground/Contents.swift @@ -26,3 +26,14 @@ func calcStats(scores: [Int]) -> (min: Int, max: Int, sum: Int) { let stats = calcStats(scores: [5, 3, 100, 3, 9]) let sum = stats.sum // 120 + +class Shape { + var numberOfSides = 0 + func simpleDescription() -> String { + return "A shape with \(numberOfSides) sides." + } +} + +var shape = Shape() +shape.numberOfSides = 7 +var shapeDesc = shape.simpleDescription()