Skip to content

Commit a45e7ca

Browse files
Order Servide Java Doc
1 parent dba88d5 commit a45e7ca

File tree

1 file changed

+24
-48
lines changed

1 file changed

+24
-48
lines changed

src/main/java/coreapi/OrderService.java

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,9 @@ public OrderService() {}
4141

4242
/*---------------------------ORDER_PRODUCTS------------------------------------------*/
4343

44-
/*
45-
* PRECONDITION:Receive an order and an id of a existing product, plus a positive quantity
46-
* POSTCONDITION: Add the product with the indicated quantity to the order
47-
*/
4844
/**
49-
* Add a quantity of product to an order of a cafeteria.
45+
* Receive an order and an id of a existing product, plus a positive quantity
46+
* Add the product with the indicated quantity to the order
5047
* @param coffe the Cafeteria which stock the different orders.
5148
* @param ord the order which stock the different products and the quantities.
5249
* @param productId the id of the product which will be add to the order.
@@ -78,12 +75,9 @@ public void addProductToOrder(Cafeteria coffe, OrderImpl ord, int productId, int
7875

7976
}
8077

81-
/*
82-
* PRECONDITION:Receive an order and an id of a existing product, plus a positive quantity
83-
* POSTCONDITION: Modify the quantity of the product indicated in the order
84-
*/
8578
/**
86-
* Modify the quantity of a product in an order
79+
* Receive an order and an id of a existing product, plus a positive quantity
80+
* Modify the quantity of the product indicated in the order
8781
* @param coffe the Cafeteria which stock the different orders.
8882
* @param ord the order which stock the different products and the quantities.
8983
* @param productId the id of the product which will be add to the order.
@@ -112,11 +106,10 @@ public void modifyProductQuantity(Cafeteria coffe, OrderImpl ord, int productId,
112106
}
113107

114108
}
115-
/*
116-
* PRECONDITION:Receive an order and an id of a existing product, plus a positive quantity
117-
* POSTCONDITION:Eliminate the indicated amount of the product
118-
*/
109+
119110
/**
111+
* Receive an order and an id of a existing product, plus a positive quantity
112+
* Eliminate the indicated amount of the product
120113
* @param ord the order which stock the different products and the quantities.
121114
* @param productId the id of the product which will be add to the order.
122115
* @param q the quantity of the product.
@@ -145,12 +138,10 @@ public void removeProductFromOrder(OrderImpl ord, int productId, int q)throws Ex
145138
}
146139

147140
/* ---------------------------------ORDER_STATUS----------------------------------*/
148-
/*
149-
* PRECONDITION:Receive an order
150-
* POSTCONDITION: Assign the status to the order
151-
*/
152141
/**
153-
*
142+
* Receive an order
143+
* Assign the status to the order
144+
* @param ord the order which status change
154145
*/
155146
public void OrderStatus_InKitchen(OrderImpl ord)throws StatusException
156147
{
@@ -165,15 +156,10 @@ public void OrderStatus_InKitchen(OrderImpl ord)throws StatusException
165156
}
166157
}
167158

168-
/*
169-
* PRECONDITION:Receive an order
170-
* POSTCONDITION: Assign the status to the order
171-
*/
172159
/**
173-
* Returns the current counter of created Orders.
174-
* This is id number that will be assigned to the next Order created,
175-
* which is unique for each and everyone of them.
176-
* @return the current unique id counter.
160+
* Receive an order
161+
* Assign the status to the order
162+
* @param ord the order which status change
177163
*/
178164
public void OrderStatus_Delivered(OrderImpl ord)throws StatusException
179165
{
@@ -187,15 +173,10 @@ public void OrderStatus_Delivered(OrderImpl ord)throws StatusException
187173
throw new StatusException("The order cannot be entered if it has not been in the kitchen.");
188174
}
189175
}
190-
/*
191-
* PRECONDITION:Receive an order
192-
* POSTCONDITION: Assign the status to the order
193-
*/
194176
/**
195-
* Returns the current counter of created Orders.
196-
* This is id number that will be assigned to the next Order created,
197-
* which is unique for each and everyone of them.
198-
* @return the current unique id counter.
177+
* Receive an order
178+
* Assign the status to the order
179+
* @param ord the order which status change
199180
*/
200181
public void OrderStatus_Payed(OrderImpl ord)throws StatusException
201182
{
@@ -210,16 +191,10 @@ public void OrderStatus_Payed(OrderImpl ord)throws StatusException
210191
}
211192

212193
}
213-
214-
/*
215-
* PRECONDITION:Receive an order
216-
* POSTCONDITION: Assign the status to the order
217-
*/
218194
/**
219-
* Returns the current counter of created Orders.
220-
* This is id number that will be assigned to the next Order created,
221-
* which is unique for each and everyone of them.
222-
* @return the current unique id counter.
195+
* Receive an order
196+
* Assign the status to the order
197+
* @param ord the order which status change
223198
*/
224199
public void OrderStatus_Finished(OrderImpl ord)throws StatusException
225200
{
@@ -242,10 +217,11 @@ public void OrderStatus_Finished(OrderImpl ord)throws StatusException
242217
* POSTCONDITION: Return the total of all orders for the date entered.
243218
*/
244219
/**
245-
* Returns the current counter of created Orders.
246-
* This is id number that will be assigned to the next Order created,
247-
* which is unique for each and everyone of them.
248-
* @return the current unique id counter.
220+
* Receive a date
221+
* Return the total of all orders for the date entered.
222+
* @param coffe Cafeteria which stock the different daily register according to the date.
223+
* @param date Date of the Daily Register which get the profit
224+
* @return total profit of the date received
249225
*/
250226
public BigDecimal getDailyRegister(Cafeteria coffe, Date date)
251227
{

0 commit comments

Comments
 (0)