Alvaro Lopez Tijeras has uploaded a new change for review. https://gerrit.wikimedia.org/r/67085
Change subject: Add divide operation ...................................................................... Add divide operation Change-Id: I303e81e84b6a64c2b9f03bfb5c386e7b6855f657 --- A org.eclipse.example.calc/src/org/eclipse/example/calc/internal/operations/Divide.java 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/sandbox refs/changes/85/67085/1 diff --git a/org.eclipse.example.calc/src/org/eclipse/example/calc/internal/operations/Divide.java b/org.eclipse.example.calc/src/org/eclipse/example/calc/internal/operations/Divide.java new file mode 100644 index 0000000..b0ad9b4 --- /dev/null +++ b/org.eclipse.example.calc/src/org/eclipse/example/calc/internal/operations/Divide.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (C) 2010, Matthias Sohn <[email protected]> + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.example.calc.internal.operations; + +import org.eclipse.example.calc.BinaryOperation; + +/** + * Binary divide operation + */ +public class Divide extends AbstractOperation implements BinaryOperation { + + @Override + public float perform(float arg1, float arg2) { + return arg1 / arg2; + } + + @Override + public String getName() { + return "/"; + } + +} -- To view, visit https://gerrit.wikimedia.org/r/67085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I303e81e84b6a64c2b9f03bfb5c386e7b6855f657 Gerrit-PatchSet: 1 Gerrit-Project: sandbox Gerrit-Branch: master Gerrit-Owner: Alvaro Lopez Tijeras <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
