Skip to main content

Need help with assignment newb level

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
lotrcomputernerd
Offline
Joined: 2013-09-25

ok so I attatched the assignment I have completed questions 1 and 2 but question three has got me stumped currently. So far I have this written:

Import java.util.Scanner
public class Problem3
{
public static void main(String[]args)
{
Scanner in = new Scanner(System.in);
String DMS1, DMS2;
int degrees1, degrees2, minutes1, minutes2, seconds1, seconds2

System.out.print(“Angle 1 (degrees minutes seconds) ? ”);
degrees1 = in.nextInt()
minutes1 = in.nextInt()
seconds1 = in.nextInt()

System.out.print(“Angle 2 (degrees minutes seconds) ? ”);
degrees2 = in.nextInt()
minutes2 = in.nextInt()
seconds2 = in.nextInt()

}
}

and I have no sweet clue how to add them and do the carry over that it talks about. Like if seconds goes over 60 than it ahs to go onto minutes. I have no clue how to do this and we haven't ever come across anyhting like this in class so I'd appreciate any lines of code or help anybody can give. Thanks.

AttachmentSize
as2.pdf272.69 KB