Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @Coding-Cuddles/kata-maintainers
/.github/CODEOWNERS @Coding-Cuddles/kata-maintainers
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Refactor the expense report while preserving its observable output. Setup is complete when all four
tests pass.
Practice the Open-Closed Principle by refactoring an expense report without changing its behavior.
Setup is complete when all four starter tests pass.

## Overview

Expand All @@ -28,29 +28,29 @@ it's not easy to modify or extend its behavior. It's your task to refactor this
code to make it cleaner and more maintainable, while ensuring that it still
correctly calculates and prints the report.

Make sure the program still behaves the same way after your refactoring.
There's a unit test suite in place that checks that on a very rudimentary level
by just looking at the output of the program.
Make sure the program still behaves the same way after your refactoring. The
unit test suite checks this at a rudimentary level by examining only the
program's output.

### Exercise 2

When you're done with refactoring, test the quality of your refactoring by
When you're done refactoring, test the quality of your refactoring by
implementing two additional scenarios:

1. Extend our system to handle two more types of expenses.

1. **Transportation**. Surcharge: 5% of the expense amount.
2. **Supplies**. Surcharge: No surcharge.

2. Add dynamic surcharge based on day of week.
2. Add dynamic surcharges based on the day of the week.

- For dinners on weekends, the surcharge is 15% of the expense amount.
- For breakfasts on weekends, the surcharge is 10% of the expense amount.
- On weekdays, the surcharges remain the same as before (10% for dinner
and 5% for breakfast).

You may need to add a `date` field to the `Expense` class to support this
requirement. The date should be the date when the expense occurred.
requirement. The field should record when the expense occurred.

> [!TIP]
>
Expand Down