From 098a179d71fbb1ce8c761b2ea80d7dd2809d5b0d Mon Sep 17 00:00:00 2001 From: ArviinM <48917421+ArviinM@users.noreply.github.com> Date: Sat, 18 Jul 2020 04:00:21 +0800 Subject: [PATCH] Uploading Files --- Pet01.java | 15 +++++++++++++++ Recursion01.class | Bin 0 -> 1166 bytes Recursion01.java | 20 ++++++++++++++++++++ Recursion05.class | Bin 0 -> 894 bytes Recursion05.java | 14 ++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 Pet01.java create mode 100644 Recursion01.class create mode 100644 Recursion01.java create mode 100644 Recursion05.class create mode 100644 Recursion05.java diff --git a/Pet01.java b/Pet01.java new file mode 100644 index 0000000..2de464c --- /dev/null +++ b/Pet01.java @@ -0,0 +1,15 @@ +class Pet01{ + private String petName; + private int petAge; + private double petWeight; + public Pet01(String initialName, int initialAge, double initialWeight){ + petName = initialName; + petAge = initialAge; + petWeight = initialWeight; + } + public static void main(String [] args){ + Pet01 test = new Pet01("Oreo", 5, 20); + + } + +} \ No newline at end of file diff --git a/Recursion01.class b/Recursion01.class new file mode 100644 index 0000000000000000000000000000000000000000..069129139ce21e152a4666ae719a3188c59524ba GIT binary patch literal 1166 zcmaJ>TTc@~7(LV5w#y<=rmF_SF16|=T)dbV75lM(;OZVC(*KUtNQ*R)+{X*o}lx@kKCFU zE%~199Oi>2rgzA)(QCE^gvqbKuS`wNR$U;}tPtFxYWa38TdJ6jV|nZpHmg;Es8J|n zSP~(8SwJnhEw5s2+fw&%pR`4(Mne*#0waO4emVs?4SB3ez?z12yb_q&a(v6vO}*hZ zZQnkzbSE$+rz?1^;SDx4Y~rnkJGd(_arv|xExT5=JOOR*$kM4!x0^X#!xpyXu%lrY z)IHFrk&1gPAIis8#lMg$eQWxbG(|c*)-lC)vjwNo@@cVU)@jS6aqWimKJ2zg*em?V zTj>>!2EEDGm!`iB31U^3_VRryj`h_qNCY1d&l58n4a?!hEL>M`h2|5kZj<3z#@2OiAp>v5|Nc zRy;sAut*U|JOB@cIOAAqN+T9NbLPyInRn}{9cS1itY>FOQNv|gPpy7f(*F`7^==|_mF?&tpN}Et#%xVpue9s;ZdKC zRpu-+nD0b447leB0yziG1CkabLk31!u^n^o!xKKr1X%4bi9G+YkP=HXDz;@~8$~P_ zxM^bx+YBrJig}obLC=pE$hj7FY@EjhnccE+8+Q!s+StQghQbV(+MHmXbq{?nK2>Ue z8pl4VRl0pB%kWH@)^nBSSw4T^cXsYy31%(SSZhC1z8 PrB6jpm)BdPJcq_#1?aaG literal 0 HcmV?d00001 diff --git a/Recursion05.java b/Recursion05.java new file mode 100644 index 0000000..87f9d87 --- /dev/null +++ b/Recursion05.java @@ -0,0 +1,14 @@ +public class Recursion05{ + public static void main(String [] args){ + System.out.print("" + fibonacci(10)); + } + public static int fibonacci(int num){ + if(num == 0){ + return 0; + } else if (num == 1){ + return 1; + } else { + return fibonacci(num - 1) + fibonacci(num - 2); + } + } +} \ No newline at end of file