Question: (60 Marks) (20 Marks) Project Question 1 2. Write a program called Triangle to output the following in a dialog box: % % % %

 (60 Marks) (20 Marks) Project Question 1 2. Write a programcalled Triangle to output the following in a dialog box: % %

(60 Marks) (20 Marks) Project Question 1 2. Write a program called Triangle to output the following in a dialog box: % % % % % (10 Marks) b. Write a Java program that takes a number as input and prints its multiplication table up to 10. Refer to the test data shown below on the output of the program: Test Data: Input a number: 8 Expected Output: 8x1=8 8 x 2 = 16 8 x 3 = 24 8 x 10 = 80 (10 Marks) Question 2 (20 Marks) a. Define a method. (2 Marks) b. Write the source code for a method called max (). This method takes two parameters numi and num2 and returns the maximum between the two. (6 Marks) c. Provide TWO (2) reasons for using comments in a program. (2 Marks) d. The following program below contains TEN (10) errors. Write down the line numbers together with the corrected program statement: (10 Marks) 1 2 3 4 public class Tricky { public static main(String[] args) { System.out.println(Hello world); system.out.println("Do you like this program"?) System.out.println() System.println("I wrote it myself."; { } 5 6 7 & Question 3 (20 Marks) (10 Marks) a. Write a Java program called PrintNames that will do the following: Create String array called names [] which will hold 5 elements. Populate the array with any 5 names Output the names in the array using a loop structure b. Write a Java program called LinkedListdemo for the plan below: (10 Marks) Plan: Create linked list called L1 add (57 + 10) add (34 - 12) add First (12) add Last (10) add (4,24) add (100-29) remove (0) remove First() remove Last (0) set (1,45) print list 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!