Last active
March 9, 2020 15:12
-
-
Save MarionLeHerisson/d0c8a06a0136abcf25c7c54285b2fa7b to your computer and use it in GitHub Desktop.
Software architecture heuristics - Exercice 1 : modélisation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product { | |
int $id; | |
string $name; | |
function isAvailable(): bool | |
{ | |
} | |
} | |
class Customer { | |
int $id; | |
string $email; | |
string $fullName; | |
int $phoneNumber; | |
bool $didBuySomething = false; | |
function register(string $email, string $fullName, string $address, int $phoneNumber) | |
{ | |
} | |
function buy(Product $product) | |
{ | |
$this->didBuySoething = true; | |
new Order($product, $this, $shippingAddress); | |
} | |
} | |
class Professional extends Customer { | |
string $billingAddress; | |
function register(string $email, string $fullName, string $address, int $phoneNumber, string $billingAddress) | |
{ | |
} | |
} | |
class MarketingPeople { | |
int $id; | |
function getCustomersToContact(): Customer[] | |
{ | |
} | |
} | |
class PostOffice { | |
int $id; | |
string $address; | |
Order[] $orders; | |
function notifyCustomerOfArrival(Customer $customer) | |
{ | |
} | |
} | |
class Order { | |
int $id; | |
Product $product; | |
Customer $customer; | |
string $address; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment