Open main menu

CDOT Wiki β

Changes

OPS435 Online Assignment 2P

12 bytes added, 21:12, 6 December 2020
Overview
'''Late Penalty:''' 20% per school day, and note that in order to pass this course, this assignment must be completed satisfactorily, i.e. a grade of 50% or more.
= Overview =
You want to designed design an algorithm to compute the date which is '''n''' day before or after a given date. You also want to implemented your algorithm using a Python class to create a new programmer-define object called "Date" with the appropriate data attributes and function attributes to support the necessary manipulation of a '''date''' object needed to implement your algorithm.
Your python script must follow the following coding guide:
* Method attributes: tomorrow(), yesterday(), day_of_week()
* Operator Overloading:
** '+': perform addition for two Date() object, and one date object and an integer.** '-': perfome substraction perform subsraction for two Date() object, and one date object and an integer
* Special methods:
** __init__(self): Date object constructor
== Tests and Test results ==
You must name your class definition python script for Date as <code>a2_class.py</code>. The following tests in an interactive python sessions are for testing your class definition. The assignment test script called [https://github.com/rayfreeping/ops435-a2p | "checkA2P.py"] should be used once your Date class passes all the interactive tests.
Please review those tests that failed and try to fix it in your class definition to address any bugs you may have.
= Due Date and Final Submission requirement =
Please submit the following files to blackboard by the due date:
* your python scriptclass file, name the file as 'a2p_[Seneca_name].py'(was named as a2_class.py above)
* the output of the checking script checkA2P.py, name the file as 'a2p_results.txt'
* the 'git log' output for your own repository 'ops435-a2p' on github.com, name the file as 'a2p_gitlog.txt'
1,760
edits