From 8487d9e811957e11df00fd181ab3fb8019ac3efb Mon Sep 17 00:00:00 2001 From: kkriiska Date: Mon, 15 May 2017 18:25:14 +0300 Subject: [PATCH] =?UTF-8?q?kodut=C3=B6=C3=B6=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kasutus07.java | 6 ++++++ kodutoo07.java | 5 +++++ liides07.java | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 kasutus07.java create mode 100644 kodutoo07.java create mode 100644 liides07.java diff --git a/kasutus07.java b/kasutus07.java new file mode 100644 index 0000000..e16379a --- /dev/null +++ b/kasutus07.java @@ -0,0 +1,6 @@ +public class kasutus07{ + public static void main(String[] args) { + liides07 kuupjuureArvutaja = new kodutoo07(); + System.out.println("Kuupjuur arvust on: "+ kuupjuureArvutaja.f(125)); + } +} \ No newline at end of file diff --git a/kodutoo07.java b/kodutoo07.java new file mode 100644 index 0000000..bd595fc --- /dev/null +++ b/kodutoo07.java @@ -0,0 +1,5 @@ +public class kodutoo07 implements liides07{ + public double f(double x){ + return Math.cbrt(x); + } +} \ No newline at end of file diff --git a/liides07.java b/liides07.java new file mode 100644 index 0000000..fb04d35 --- /dev/null +++ b/liides07.java @@ -0,0 +1,3 @@ +public interface liides07{ + public double f(double x); +} \ No newline at end of file