From 953bf14ea4c97f182628526ff60c049a7cdda9a5 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Fri, 26 Aug 2022 07:25:42 -0500 Subject: [PATCH] Work some more --- .../mp1_calebfontenot/CompoundValue.java | 28 +++++++++++++++ .../mp1_calebfontenot/NumberOfYears.java | 4 +++ .../mp1_calebfontenot/WindChill.java | 33 ++++++++++++++++++ .../target/classes/.netbeans_automatic_build | 0 .../mp1_calebfontenot/CompoundValue.class | Bin 0 -> 660 bytes .../mp1_calebfontenot/NumberOfYears.class | Bin 1639 -> 1639 bytes .../mp1_calebfontenot/WindChill.class | Bin 0 -> 1674 bytes .../test-classes/.netbeans_automatic_build | 0 8 files changed, 65 insertions(+) create mode 100644 MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/CompoundValue.java create mode 100644 MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/WindChill.java delete mode 100644 MP1_CalebFontenot/target/classes/.netbeans_automatic_build create mode 100644 MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/CompoundValue.class create mode 100644 MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/WindChill.class delete mode 100644 MP1_CalebFontenot/target/test-classes/.netbeans_automatic_build diff --git a/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/CompoundValue.java b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/CompoundValue.java new file mode 100644 index 0000000..1297d48 --- /dev/null +++ b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/CompoundValue.java @@ -0,0 +1,28 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package com.calebfontenot.mp1_calebfontenot; + +import java.util.Scanner; + +/** + * + * @author caleb + */ +public class CompoundValue { + public static void main(String[] args) { + // Create Scanner + Scanner input = new Scanner(System.in); + + // Define vars + double SavingAmount; + + + // Prompt for input + + // Compute + + // Print result + } +} diff --git a/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/NumberOfYears.java b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/NumberOfYears.java index f1b870e..4ea1afa 100644 --- a/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/NumberOfYears.java +++ b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/NumberOfYears.java @@ -1,3 +1,4 @@ + /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template @@ -31,6 +32,9 @@ public class NumberOfYears { NumberOfDays = (NumberOfHours / 24); NumberOfYears = (NumberOfDays / 365); + // Big brain math time + // Check if double "NumberOfYears" equals int "NumberOfYears" + //If it isn't, subtract 365 from "NumberOfDays" until the number is under 365 // Print output System.out.println((int) NumberOfMinutes+" minutes is approx. :"); diff --git a/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/WindChill.java b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/WindChill.java new file mode 100644 index 0000000..6691b91 --- /dev/null +++ b/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/WindChill.java @@ -0,0 +1,33 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package com.calebfontenot.mp1_calebfontenot; + +import java.util.Scanner; + +/** + * + * @author caleb + */ +public class WindChill { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + //> Enter the new temperature in Fahrenheit + System.out.print("Enter the temperature in Fahrenheit between -58∞F and 41∞F: "); + double fahrenheit = input.nextDouble(); + + //> Enter the wind speed miles per hour + System.out.print("Enter the wind speed miles per hour "+ + "(must be greater or equal to 2):"); + double speed = input.nextDouble(); + + //> Compute wind and chill index + double windChillIndex = 35.74 + 0.6215 * fahrenheit - 35.75 + * Math.pow(speed, 0.16) + 0.4275 * fahrenheit + * Math.pow(speed, 0.16); + + //> Display the result + System.out.println("The wind chill index is "+ windChillIndex); + } +} diff --git a/MP1_CalebFontenot/target/classes/.netbeans_automatic_build b/MP1_CalebFontenot/target/classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000 diff --git a/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/CompoundValue.class b/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/CompoundValue.class new file mode 100644 index 0000000000000000000000000000000000000000..f15c54e9c9ba60f0267b72f6280bd3923144815c GIT binary patch literal 660 zcmb7C$w~u36s*oRCK)wxiE&>}i3bPq81bSALR=sc5D(Isw6ViXcbN1DewJPY1wX)# z5?@aQ4dmh+>QQg0N4=iUueT2XN7yMKg|vf=i!5>sr9OY;Ucgn)yX^FZZy0iiQb}{f zkgnC+4yG8&NmFcO;I(|Nl!)>upy#&A6~kgPnUvZ)Q-j#FOeA>N zD8NCpgpBY-5fd*M2FG zK5~Q$#5{_OVs`fx>^Uhf652B8{VIg+r~yl;63b&5DB32WfO2S=YYm_gN>N++EH;H8#r9otiFoo@JYL}S& literal 0 HcmV?d00001 diff --git a/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/NumberOfYears.class b/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/NumberOfYears.class index 9b086defa7617dddb8c01155432bff8570aa90d8..de563f15397ee9e9140bde4dc84fd3b765b9bb96 100644 GIT binary patch delta 59 zcmaFP^PFdc7%L;+WO3Gcni32=4AKlD3^EK-4Dt+$3=n36}r> diff --git a/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/WindChill.class b/MP1_CalebFontenot/target/classes/com/calebfontenot/mp1_calebfontenot/WindChill.class new file mode 100644 index 0000000000000000000000000000000000000000..c099f2d2e1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diff --git a/MP1_CalebFontenot/target/test-classes/.netbeans_automatic_build b/MP1_CalebFontenot/target/test-classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000