Professional Documents
Culture Documents
Homework 01
RULES
• Students have to do both: submit their code and attend the test. In case of lack of
one, the student will not be graded.
CODE SUBMISSION
• Students should write and submit their code in one java file.
• The code submissions whose students did not attend the test will not be evaluated.
• Late submissions will not be accepted. Submission system will be closed after deadline.
Submissions via e-mail will not be accepted.
TEST
• Test slot will be visible under Weekly Content/Homeworks folder as ”Homework01 Test”
on 25th March 19:00.
• Students can attend any time at this time duration. After 23:30, students will not
able to attend the test.
• The duration of the test will be 30 minutes. Be sure that you saved your answers
during the test.
• Questions in the test will be about the codes written. Be prepared before the test,
e.g. open your Eclipse etc.
• In the test, questions may ask to manipulate your code or test your code with different
values. Be sure that your codes are dynamic for changes.
1
QUESTIONS
Part I
(40 points)
Write a program that calculates the result of following function of given x:
x
X
f (x) = f (k − 1) + (−1)k .f (k − 2) + x
k=1
Part II
(40 points)
√
Implement the Newton’s Algorithm to find cube-root ( 3 n) of a given number. The number
of iteration and initial value (x1 ) should be determined by user.
Part III
(20 points)
Write a program that finds summation of all factors of a given number x. For example, the
factors of 18 is {1, 2, 3, 6, 9, 18}, so the summation is 39.