Assignment 2
Assignment 2
Assignment 2
1. Write a Java program to print 'Hello' on screen and then print your name
on a separate line.
Expected Output :
Hello
Laith AL shehab
Test Data:
a. -5 + 8 * 6
b. (55+9) % 9
c. 20 + -3*5 / 8
d. 5 + 15 / 3 * 2 - 8 % 3
Expected Output :
43
1
19
13
Input Data:
Input a binary number: 100
Expected Output
Decimal Number: 4
6. Write a Java program to print the contents of a two-dimensional Boolean
array where t will represent true and f will represent false.
Sample array:
array = {{true, false, true},
{false, true, false}};
Expected Output :
tft
ftf
Expected Output:
Original Array:
[1, 4, 17, 7, 25, 3, 100]
3 largest elements of the said array are:
100 25 17
Submission:
You must put all your work (the Java Application NetBeans project) in one Folder named
based on your Name and ID followed by the Homework Number. Then compress this
folder into one .rar or .zip file and upload it into the MEU e-learning system.