




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Name : _________________________________ Tutorial : ___________________________ ANSWER ALL QUESTIONS.
Test the system and record all the problem found. The design of pseudocode and flowchart. Ahmad is analysing the process of a system that his team needs to develop. d) In your opinion, why should the program be tested before delivering it to the user? [ 2 marks ]
Untuk Kegunaan Pemeriksa No. Soalan Markah 1 11 2 15 3 29 4 15 Jumlah
e) Justify one (1) importance of algorithm in problem solving. [ 2 marks ]
c) Rewrite the below Java assignments in the correct version. [ 3 marks] (assume all the variables have been declared.) d) What is the output of the following code segments? (assume all the variables have been declared.) [ 3 marks] Java Statements Output i. y = 10; if (y > 7) System.out.print ("AAA"); System.out.print ("BBB"); ii i . for (u = 1; u > 3; u = u+1) { System.out.print (u + " " ); } iii. System.out.print(โ### โ); System.out.println(โ****โ); System.out.print(โ##โ); System.out.print(โ/n**โ); i. char aChar = 5.5; ii. if (salesAmount >10 && <50) iii. String aName; String anotherName; if (aName == anotherName)
iii) Write a Java program segment for : A Method named calcNumbers that will accept two integer numbers and return the product value if both numbers are odd, return the total value if both numbers are even or return the division value if both numbers are not odd or even. [ 6 marks ]
[ 15 marks ]