This flashcard is just one of a free flashcard set. See all flashcards!
81
79. Wie sieht die Signatur eines Stacks in EML aus? Was sieht in Java an der Signatur anders aus?
Signatur mit EML:
sorts Stack
opns isEmpty: Stack -> Bool
push: Stack x Item -> Stack
pop: Stack -> Stack
isIn: Stack x Item -> Bool
extractTop: Stack -> Item x Stack
delete: Stack -> Stack
Signatur in Java:
class Stack
{
boolean isEmpty();
void push(Object x);
void pop();
boolean isIn(Object x);
Object extractTop();
void delete();
}
sorts Stack
opns isEmpty: Stack -> Bool
push: Stack x Item -> Stack
pop: Stack -> Stack
isIn: Stack x Item -> Bool
extractTop: Stack -> Item x Stack
delete: Stack -> Stack
Signatur in Java:
class Stack
{
boolean isEmpty();
void push(Object x);
void pop();
boolean isIn(Object x);
Object extractTop();
void delete();
}