-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
367 additions
and
262 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# Drink automat | ||
|
||
***In this project some basic functionalities (changing coins, filling in coins, filling out coins and delivering an order and change) of a drink machine are implemented.*** | ||
|
||
## Requirements | ||
All tools with which you can execute Java code. | ||
|
||
## How to test the Project | ||
The entire tests can be found in the class testDrinkAutomat in folder ../drinkAutomat/src/drinkAutomatTest/testDrinkAutomat.java. | ||
When you run this class, all tests are run automatically. Explanations for each test can be found in the test itself. |
Binary file modified
BIN
-1 Byte
(100%)
out/production/drinkAutomat/drinkAutomat/common/Automat.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
out/production/drinkAutomat/drinkAutomat/common/ProductType.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+17 Bytes
(100%)
out/production/drinkAutomat/drinkAutomat/model/CoinAndQuantity.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+24 Bytes
(100%)
out/production/drinkAutomat/drinkAutomat/model/DrinkAndChange.class
Binary file not shown.
Binary file modified
BIN
+52 Bytes
(100%)
out/production/drinkAutomat/drinkAutomat/model/DrinkAutomat.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+453 Bytes
(110%)
out/production/drinkAutomat/drinkAutomatTest/testAutomate.class
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
package drinkAutomat.common; | ||
|
||
import drinkAutomat.model.Coin; | ||
import drinkAutomat.model.CoinAndQuantity; | ||
|
||
import java.util.List; | ||
|
||
public abstract class Automat { | ||
///TODO | ||
|
||
protected abstract void fillInWithCoin(List<Coin> coins); | ||
//protected abstract void fillIntWithDrink(); | ||
|
||
/** | ||
* TODO | ||
* Implement: protected abstract void fillIntWithDrink(); | ||
*/ | ||
protected abstract void fillOut(List<CoinAndQuantity> restCoinToGiveBack); | ||
|
||
protected abstract List<CoinAndQuantity> changeCoin(int sum); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package drinkAutomat.common; | ||
|
||
/** | ||
* The coin is initialised in cents. | ||
*/ | ||
public enum CoinValue { | ||
ONE_EURO(100), | ||
TWO_EURO(200), | ||
FIFTY_CENT(50), | ||
TEN_CENT(10), | ||
TWENTY_CENT(20); | ||
|
||
private final int coinValue; | ||
|
||
CoinValue(int value) { | ||
this.coinValue = value; | ||
} | ||
|
||
public int getValue() { | ||
return this.coinValue; | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package drinkAutomat.model; | ||
|
||
import drinkAutomat.common.CoinValue; | ||
|
||
public class Coin { | ||
|
||
CoinValue coinValue; | ||
|
||
/** | ||
* @param coinValue represents the real coin value. | ||
*/ | ||
public Coin(CoinValue coinValue) { | ||
this.coinValue = coinValue; | ||
} | ||
|
||
public CoinValue getCoinValue() { | ||
return coinValue; | ||
} | ||
|
||
public void setCoinValue(CoinValue coinValue) { | ||
this.coinValue = coinValue; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.