Skip to content
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ In addition to implementing parallel computing, I am planning to incorporate use

## License
This project is licensed under the MIT License.
<!-- Catatan: Perubahan ini untuk latihan Pull Request dan Review -->
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ def generate_flashcards():
return jsonify(response)

if __name__ == '__main__':
app.run()
app.run()

Binary file added docs/uml/classes_flashcard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/uml/packages_flashcard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/uml/sequence_create_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/uml/sequence_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions uml_classes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class UserModel:
def __init__(self):
self.username = ""
self.password = ""

class UserController:
def __init__(self):
self.model = UserModel()

def login(self, username, password):
return self.model.username == username and self.model.password == password

class Item:
def __init__(self, name, price):
self.name = name
self.price = price

class ItemController:
def __init__(self):
self.items = []

def create_item(self, name, price):
item = Item(name, price)
self.items.append(item)
return item