-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCohesion.ts
29 lines (17 loc) · 987 Bytes
/
Cohesion.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class OnlineShop {
private orders: any;
private offeredProducts: any;
private customers: any;
public addProduct(title: string, price: number) {} // offeredProducts
public updateProduct(productId: string, title: string, price: number) {} // offeredProducts
public removeProduct(productId: string) {} // offeredProducts
public getAvailableItems(productId: string) {} // offeredProducts
public restockProduct(productId: string) {} // offeredProducts
public createCustomer(email: string, password: string) {} // customers
public loginCustomer(email: string, password: string) {} // customers
public makePurchase(customerId: string, productId: string) {} // customers, orders, offeredProducts
public addOrder(customerId: string, productId: string, quantity: number) {} // customers, orders, offeredProducts
public refund(orderId: string) {} // customers, orders
public updateCustomerProfile(customerId: string, name: string) {} // customers
// ...
}