CSC207-2022F-UofT / course-project-bill-gates

A bill recording software developed by team "Bill Gates."
9 stars 4 forks source link

We have already shutdown our database service. The database dump script is in the database folder.

Bill Gates - Your next Bill Management System

Final Presentation

Functionalities and Specifications

Code Organization

Test Coverage

Currently, we have implemented the following test suit:

MySQLDatabaseGatewayTests
- testCreateUsersTable
- testGetUserData
- testCreateBillTable
- testCreateSplitBillTable
- testInsertUser
- testInsertEntryAllAttributes
- testInsertEntryMainAttributes
- testInsertEntryAutoIncrement
- testGetEntry
- testGetBillDataAll
- testGetBillDataPartial
- testModifyEntryDescription
- testModifyEntryValue
- testModifyEntryDate
- testModifyEntryAll
- testDeleteEntry

AlterEntryUseCaseTests
- testAlterEntryLocation
- testAlterEntryValue

BillUpdateUseCaseTests
- testEmptyBill
- testRandomBill
- testRandomSplitterBill

DeleteEntryUseCaseTests
- testOneEntryDeleted
- testMultipleEntriesDeleted

InsertEntryUseCaseTests
- testNormalEntry
- testSplitterEntry

UserJoinUseCaseTests
- testRegisterNewUser
- testLoginExistingUser
- testWrongPasswordForLogin

Code Style and Documentation

Use of GitHub Features

Discussion

Issues

Pull Request

Project

Actions

Auto Grading: Running Tests

Auto Release: Create Releases

Design Patterns

User: Singleton

DatabaseGateway: Strategy

EntryBuilder: Builder

Clean Architecture

SOLID

  1. Single Responsibility Principle: Every class in our project has only one responsibility. For example,
    • each controller is only responsible for constructing the request model for each use case,
    • each use case is only responsible for processing the request model into the response model,
    • each presenter is only responsible for converting the response model into a GUI friendly view model, and
    • each view is only responsible for its own part of display.
  2. Open and Closed Principle: We completely adhere this principle.
    • For example, we have various input ports, and those input ports are simply interfaces to decouple the controller and the use case implementation of each use case. We can easily add another implementation of the use case by implementing the input port interface, without needing to change any other codes.
    • Also, we can easily add another implementation of data persistence by implementing the database boundaries. Our codes are open for extending but closed for modifications.
  3. Liskov Substitution Principle: Our subclasses do not alter the behavior of the general inherited behavior. Therefore, we can safely substitute objects of the super classes by the subclasses.
  4. Interface Segregation Principle: All interfaces in our projects have clearly defined specifications and any subset of the interfaces can not support the normal life cycle of our program. Therefore, we made interfaces into separate, small, concise, but necessary parts. Client codes won't be forced to implement the parts they don't need.
  5. Dependency Inversion Principle: As we explained in the Clean Architecture section, our codes completely follow the Clean Architecture principles, and we have a bunch of boundaries separating different layers and doing dependency inversions. Therefore, we followed this principle automatically.

Standards

Database Standards

Related issues

The User Table

Table Specifications:

Column Name Data Type Notes
user_id INT
user_name VARCHAR(10) The max user name length is 10
password VARCHAR(16) The max password length is 16
bill_id INT This is the main bill id of this user

The Main Bill Table

Table Specifications:

Column Name Data Type Notes
entry_id INT
date TIMESTAMP
value DECIMAL(16, 2) We expect value to have 16 integer places and 2 decimal places
currency CHAR(3) As defined in ISO 4217, currency codes all have a length of 3
description TEXT
from TEXT
to TEXT
location TEXT
split_bill_id INT The splitter bill id associated with this entry. We define entry_id = split_bill_id.

The Splitter Bill Table

Table Specifications:

Column Name Data Type Notes
entry_id INT
date TIMESTAMP Inherited from the parent entry.
value DECIMAL(16, 2) We expect value to have 16 integer places and 2 decimal places
currency CHAR(3) Inherited from the parent entry.
description TEXT
from TEXT Inherited from the parent entry.
to TEXT Inherited from the parent entry.
location TEXT Inherited from the parent entry.
payee TEXT This represents the person who is responsible for this split.
paid_back BOOLEAN This represents whether the payee had paid the money back.

Cloud Standards

Related issue

Connection details

hostname=bill-gates-database.mysql.database.azure.com
username=scott
password=Billgates@
ssl-mode=require

Use Case Standards

User Join Use Case

About Us

We are the group "Bill Gates" and we are developing the software "Bill Gates".

We hope that you can be the next Bill Gates with the help of "Bill Gates".

Group Members: