W2031 Designing a Floating Point Type
From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Prerequisites[edit]
Background[edit]
Introduction[edit]
Topic Headers[edit]
Key Concepts[edit]
Exercises[edit]
- Design a struct whose member properties may only be of type Int.
- Define initializers:
init(_ d:Double)
init(_ n:Int)
- Define operations for addition, subtraction, multiplication, and division.