Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECM3440-Python-classes

Examples and exercises in designing, building, and testing classes.

Operator overloading

The built-in numeric types in Python can be combined in the usual ways using operators such as + and -. This facility can be added to your own classes through what is called operator overloading. This can be applied to any type you create, not just those that represent numbers, but do take care not to confuse your users.

Reminder. Python strings make use of operator overloading.

print ("Hello " + "world")
print ("_" * 11)
Hello world
___________

Operator overloading exercise

Domain-Driven Design

In DDD we identify entities, values, and services.

DDD services exercise

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages