From 930377cc2cef2f26dab87e3366a39ef92d878df9 Mon Sep 17 00:00:00 2001 From: GinaD14 Date: Mon, 19 Feb 2024 12:06:54 -0800 Subject: [PATCH 1/4] Finished Assignment 4 --- .idea/misc.xml | 1 - src/.gitkeep | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..6e86672 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/src/.gitkeep b/src/.gitkeep index 8b13789..6da3bcd 100644 --- a/src/.gitkeep +++ b/src/.gitkeep @@ -1 +1,23 @@ +public class Multadd { + public static void multadd(double a, double b, double c){ + double trig, logarithm,answer; + answer=(a*b+c); + System.out.println("The result of a*b+c is: "+ answer); //Computes the value of multadd + trig=(Math.sin(Math.PI/4.0)+ (Math.cos(Math.PI/4.0))/2); //computed the value of the trigonometric equation + logarithm=Math.log10(10.0)+Math.log10(20.0); //Computes the value of the logarithmic equation + System.out.println("The result of the trigonometric equation sin(pi/4) + (cos(pi/4))/2 is: " + trig); + System.out.println("The result of the logarithmic equation log(10)+log(20) is: "+logarithm); + + } + public static void expSum(double x){ + double result; + result=x*Math.exp(-x)+Math.sqrt(1-Math.exp(-x)); + System.out.println("The result of the exponential equation is: " +result); //computes the value of the exponential equation called from main + } + public static void main(String[] args) { + multadd(1.0,2.0,3.0); + expSum(1.0); + + } +} \ No newline at end of file From 636238198219127dec082bdaea95e7f3df1131c8 Mon Sep 17 00:00:00 2001 From: GinaD14 Date: Mon, 19 Feb 2024 12:12:16 -0800 Subject: [PATCH 2/4] Finished Assignment 4 --- .idea/vcs.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 5c723c77c2d53d13b9427e444b041f87bd79c433 Mon Sep 17 00:00:00 2001 From: GinaD14 Date: Mon, 19 Feb 2024 12:24:48 -0800 Subject: [PATCH 3/4] Finished Assignment 4 --- src/.gitkeep | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/.gitkeep b/src/.gitkeep index 6da3bcd..2f1f8ad 100644 --- a/src/.gitkeep +++ b/src/.gitkeep @@ -1,23 +1,32 @@ +public class RedesignDate { -public class Multadd { - public static void multadd(double a, double b, double c){ - double trig, logarithm,answer; - answer=(a*b+c); - System.out.println("The result of a*b+c is: "+ answer); //Computes the value of multadd - trig=(Math.sin(Math.PI/4.0)+ (Math.cos(Math.PI/4.0))/2); //computed the value of the trigonometric equation - logarithm=Math.log10(10.0)+Math.log10(20.0); //Computes the value of the logarithmic equation - System.out.println("The result of the trigonometric equation sin(pi/4) + (cos(pi/4))/2 is: " + trig); - System.out.println("The result of the logarithmic equation log(10)+log(20) is: "+logarithm); + // Part 1 + + public static String printAmerican(String day, int date, String month, int year) { + String aTemplate = "%s, %s %dth, %d"; + System.out.printf(aTemplate, day, month, date, year); + return ""; } - public static void expSum(double x){ - double result; - result=x*Math.exp(-x)+Math.sqrt(1-Math.exp(-x)); - System.out.println("The result of the exponential equation is: " +result); //computes the value of the exponential equation called from main + + public static String printEuropean(String day, int date, int month, int year) { + String bTemplate = "%s, %02d.%02d.%d"; + System.out.printf(bTemplate, day, date, month, year); + return ""; + } + + public static void twoLine() { + System.out.println("\n"); + + } + public static void main(String[] args) { - multadd(1.0,2.0,3.0); - expSum(1.0); + printAmerican("Wednesday", 7, "February", 2024); + twoLine(); + printEuropean("Wednesday", 07, 02, 2024); + } + } \ No newline at end of file From bd1e0976f3c954f874c7a2682b794e2805e8c1a5 Mon Sep 17 00:00:00 2001 From: GinaD14 Date: Mon, 19 Feb 2024 12:27:34 -0800 Subject: [PATCH 4/4] Finished Lab 4 --- Java-Assignment-004.zip | Bin 0 -> 5567 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Java-Assignment-004.zip diff --git a/Java-Assignment-004.zip b/Java-Assignment-004.zip new file mode 100644 index 0000000000000000000000000000000000000000..af9f9af59fd78a04850d1e5def36d375d879e4e7 GIT binary patch literal 5567 zcmaJ_1yqz<*B-h{kZwt7>5}elkd{V<0ftmcQlvx}=~TG1v~+iebjnD0L1pMr_-F3@ z?hm@uz1F+d`_5YDnZ3{1``PkrNko^`7=Q6)v1O|4tg!7PF(38GdHxLTNYdX@3xDD%k zF0Qq&1&gR#i)c%p%aaCJVw_a!{re@}hPZY6nno2^m6NVW@%qQy!F3_E<^7fx&7p$R z9|!I>MzDm%y^WS7I6J23D+k~I_ypU|QoG#DRG^qXU4eTXqYT#_w#XCo?Ggsfrn_ux zR%U49JBtz5ZJfat>27Ro?q_BoH8SdnKG0gq&HGj>NGw4w1;dSw5g!z_8s}`-+*B>0 zFUybD`=jX4CzrN`ZZK*je z^BlBm~a!r{+?!y_gT%vZ1e&METNr%EC@TcD3ptK*4K z01^h-Qz|kIw8LWcQp^WN3hsY1Tf7OrrAibQfq$!=oDEBYUCSvhx;2HAAcyy!j8qo& zS~`Tr)h;JzCpU$}>7|&~s$8~H$0PlxS}#O=UIxA2dG=-EZ4tPNh}+4-m3lDisZm2< zXksuO>Dkno%*qCKwk=aJB)c?bL4V$WFU4^53-wZqcdy_6cxwHW_q{@)d0~PZeDFn2fhwRA6_QVex*lKHyMbr$^6Wk~wGKjymY7B%_1^LhOo4_sID1$6o45 zG>X(ci^fdz{y^(Enky#fChro>EYrstJCz%2TDqFM4cl`GF6xv}RJu(s`?AWzebv9T z?;ez^Uhr$$X;8~!aiu?Y;aJ`h42XY7AsL6aH{KrkZ8lq`JX7)YRRTG-0e^F{%`@5$ zc|1<(xTa@@TGXbaJupjcH4Mzb44@7g3IGs_4ghGw3kn+mzytsitbZ&h%HI`~ldYXK z4`SV~3z6xM>#oaD&(KXpLydEUU8i4tY=}oyLq~aNScPkIW0Gf7c|>IjK~V5AMPL0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