sweWS1314 aktualisiert

This commit is contained in:
Karp 2014-08-11 17:24:04 +02:00
parent 96f33ea158
commit a720f9ed19

View File

@ -67,22 +67,22 @@
(3c) State three test cases for the code below. Whih coverage do your test cases provide?\\
\begin{lstlisting}[]{}
String debitCard (int cardId, float Price){
if(isValid(cardID)){
float currentValue = getValue(cardID);
if(currentValue < price){
return "Not enough money on card: " + currentValue;
}
else {
float newValue = currentValue - price;
setValue(cardId, newValue);
return "New Value: " + newValue;
}
}
else{
return "Invalid cardId";
}
}
String debitCard (int cardId, float Price){
if(isValid(cardID)){
float currentValue = getValue(cardID);
if(currentValue < price){
return "Not enough money on card: " + currentValue;
}
else {
float newValue = currentValue - price;
setValue(cardId, newValue);
return "New Value: " + newValue;
}
}
else{
return "Invalid cardId";
}
}
\end{lstlisting}
\section{Q4: Project \& Change Management}