Changes

Jump to: navigation, search

OPS435 Python3 Assignment 2P

258 bytes added, 22:14, 7 November 2019
Tests and Test results
Please review those tests that failed and try to fix it in your class definition to address any bugs you may have.
 
=== Test for tomorrow and yesterday methods ===
: Start up an interactive Python session and issue the following python statments:<source lang="python">
2019-01-01
</source>
=== Test for operator overloading '+' and '-' ===
<source lang="python">
>>> d2
2019-02-28
 
>>> d2 + 1
2019-03-01
 
>>> d2 + 2
2019-03-02
 
>>> d3
2016-02-28
 
>>> d3 + 1
2016-02-29
>>> (d3 + 1) - 1
2016-02-28
 
>>> d3 - 1
2016-02-27
 
>>> d4
2018-12-31
 
>>> d4 + 365
2019-12-31
 
>>> d4 - 365
2017-12-31
</source>
=== Test for operator overloading '+' and '-' ===
=== Test for day of the week method ===
1,760
edits

Navigation menu