Skip to content

cmfeng/ext-domain-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Name: ExtDomainModel Go back to the class exercise from Tuesday

  • Copy the code to a new project

  • Implement the CustomStringConvertible protocol on all types

define a "description" property of type String this property should return a human-readable version of the contents for example, Money should return "EUR22.0" (for amount 22.0 and currency EUR)

  • Unit tests!

  • Define a new protocol: Mathematics

mathematical operation methods (+, -) define it on Money write tests to verify that we can add and remove Money

  • Unit tests!

  • Use an extension to extend Double

add four new extension properties, USD, EUR, GBP, YEN each should return a Money each should convert the Double into a Money using "self" as the amount

  • Unit tests!

Rubric

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages