diff --git a/.idea/misc.xml b/.idea/misc.xml index 6e86672..172df7b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,6 @@ + - + \ No newline at end of file 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 diff --git a/Java-Assignment-002.iml b/Java-Assignment-002.iml index b46c0dd..e1006ff 100644 --- a/Java-Assignment-002.iml +++ b/Java-Assignment-002.iml @@ -5,6 +5,7 @@ + \ No newline at end of file diff --git a/src/Time.java b/src/Time.java new file mode 100644 index 0000000..f5d9d6f --- /dev/null +++ b/src/Time.java @@ -0,0 +1,25 @@ +public class Time { + static int hours = 16; + static int minutes = 25; + static int seconds = 30; + public static void main (String[] args) { + + + System.out.println(hours+":"+minutes+":"+seconds); + System.out.println(seconds+(minutes*60)+(hours*3600)+ " seconds since midnight" ); + System.out.println(86400-(seconds+(minutes*60)+(hours*3600))+ " remaining second of the day" ); + //double dhour = 16.0; + //double dminute = 25.0; + //double dsecond = 30.0; + double totalTimeS = (seconds+(minutes*60)+(hours*3600)); + System.out.println(totalTimeS/86400 *100); + int hours = 17; + int minutes = 49; + int seconds = 12; + int currentTime = (seconds+(minutes*60)+(hours*3600)); + int startingTime = (Time.seconds+(Time.minutes*60)+(Time.hours*3600)); + + System.out.println((currentTime-startingTime)+ " seconds have past since starting this assignment"); + + +} }