Difference between revisions of "W2031 Designing a Floating Point Type"

From Coder Merlin
(Created page with "thumb|Evergreen Point Floating Bridge == Prerequisites == == Background == == Introduction == == Topic...")
 
Line 1: Line 1:
[[File:Evergreen Point Floating Bridge eastbound from HOV lane.jpg|thumb|Evergreen Point Floating Bridge]]
[[File:Evergreen Point Floating Bridge eastbound from HOV lane.jpg|thumb|Evergreen Point Floating Bridge]]
== Prerequisites ==
== Prerequisites ==
== Background ==
== Background ==
== Introduction ==
== Introduction ==
== Topic Headers ==
== Topic Headers ==
== Key Concepts ==
== Key Concepts ==
== Exercises ==
== Exercises ==
* Design a '''struct''' whose member properties may only be of type '''Int'''.
* Design a '''struct''' whose member properties may only be of type '''Int'''.
* Define initializers:
* Define initializers:
Line 11: Line 11:
** init(_ n:Int)
** init(_ n:Int)
* Define operations for addition, subtraction, multiplication, and division.
* Define operations for addition, subtraction, multiplication, and division.
== References ==
== References ==

Revision as of 21:25, 10 November 2020

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Evergreen Point Floating Bridge

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.

References[edit]