The following applies to each of the given problems:
• The program should aim to be as small as possible, without sacrificing readability.
• The crucial steps of a program must be documented appropriately.
• The submission should include a sample output to demonstrate that the program
works as intended.
PROBLEM 1.
Write a program in Java that takes as input two integers from the command-line, and outputs true if they are divisible either by 7 or by 11, and outputs false otherwise.
PROBLEM 2. [3 MARKS]
Write a program in Java that takes as input a positive integer n from the command-line, and outputs all the powers of 3 that are less than or equal to n. State the limitations, if any, of your program.
PROBLEM 3. [4 MARKS]
Write a program in Java that computes the trigonometric function sin(x) given by the series
sin(x)=x-x3/3!+x5/5!-x7/7!+· · · .
The program should take as input a number from the command-line, and output the sine value of that number.