Army Transportation and Aviation Logistics School Java Programming Java assignment ……………………………………………………………..

Army Transportation and Aviation Logistics School Java Programming Java assignment …………………………………………………………….. .. Stay Home
1:57 PM
moodle.mec.edu.om
MEC_AMO_TEM_034_01
Page 1 of 9
Introduction to Programming (COMP 0303.1) – Spring – 20 -CW1 (Assignment-1) – All – QP
2)
Write a java program to print following pattern using inner loop concept
3 5 7 9 11
2 4
6
8
13
15
17
10
12
19
(25 Marks)
SAMPLE INPUT/OUTPUT SCREEN (1):
5
C:Program Files (x86)XINOXS-1 VCREAT-1GE2001.exe
-Please enter how many lines you want to enter
3 5 7 9 11
2 4 6 8
13
15
17
10
12
19
Press any key to continue…-
SAMPLE INPUT/OUTPUT SCREEN (2):
E C:Program Files (x86)XINOXS-1 CREAT-11 GE2001.exe
Please enter how many lines you want to enter
2 2 4 6 8 10 12 14 16
8
3
5
7 9
11
13
15
18
20
22
24
26
28
17
19
21
23
25
30
32
34
36
27
29
31
38
40
33
Press any key to continue…-
MEC_AMO_TEM_034_01
Page 2 of 9
Introduction to Programming (COMP 0303.1) – Spring – 20 -CW1 (Assignment-1) – All – QP
..l Stay Home
1:57 PM
moodle.mec.edu.om
MEC_AMO_TEM_034_01
Page 3 of 9
Introduction to Programming (COMP 0303.1) – Spring – 20 -CW1 (Assignment-1) – All – QP
4. Write and execute a JAVA program to accept three numbers from the user to evaluate the following
expressions given below. Use appropriate data type for each variable used.
21 = a + (b* c) %33;
z2 = a +b^3 + 8/(2*c);
23 = !a < c) || (a9); SAMPLE OUTPUT SCREEN C:Program Files (x86)XINOXS-1UCREAT-1GE2001.exe Enter value for a 23 Enter value for b 15 Enter value for c 12 The result of z1 is : 38.0 The result of z2 is: 3398.3333333333335 The result of z3 is : true The result of z4 is : false Press any key to continue... (10 Marks) 5. Write your reflection about Task2, Task3 and Task 4 including the tracing of the output for each of the programs. ( 30Marks) . Rules & Regulations: All resources should be cited using CU Harvard style. The final assignment must have a Title page, Table of Contents, References/ bibliography using CU Harvard Style and page numbers. Title Page must have Assignment Name, Module name, Session, your name, ID, and the name of the faculty. • Softcopy in word format is to be submitted through Turnitin link on Moodle. Viva may be conducted after the assignment submission as per the dates informed earlier. MEC_AMO_TEM_034_01 Page 4 of 9 .. Stay Home 1:57 PM moodle.mec.edu.om MEC_AMO_TEM_034_01 Page 2 of 9 Introduction to Programming (COMP 0303.1) - Spring - 20 -CW1 (Assignment-1) - All - QP 3) Write a java program to calculate the taxable amount and Tax as per following scenario: Calculate Taxable amount that will compute and display the taxable amount based on the following conditions: If the type of tax is "Income tax" and the yearly income is greater than 20,000 then taxable amount is twice the yearly income. Otherwise taxable amount is the same as the yearly income. If the type of tax is "Property tax" and the yearly income is greater than 20,000 then the taxable amount is 3 times the yearly income. Otherwise, the taxable amount is twice the yearly income Calculate tax based on the below given conditions • If type of tax is "Income tax" and years to pay tax is greater than 1 year, then overall total tax is 3% of the taxable amount. But if years to pay tax are less than 1 year, then overall tax is 2% of the taxable amount. If type of tax is "Property tax" and years to pay tax is greater than 1 year, then overall total tax is 4% of the taxable amount. But if the years to pay tax is less than 1 year, then overall total tax is 3% of the taxable amount. (25 Marks) NOTE:- you have to use switch case selection structure for this program SAMPLE INPUT/OUTPUT SCREEN :: C:Program Files (x86)XINOXS-1CREAT - 1GE2001.exe ох Enter income amount 20000 Enter type I or i for and P or p doe i Enter Tax Pay years 5 Taxable Amount is 20000.0 Overall Total Tax = 600.0 Press any key to continue... MEC_AMO_TEM_034_01 Page 3 of 9 Introduction to Programming (COMP 0303.1) - Spring - 20 -CW1 (Assignment-1) - All - QP Alrite andava following Purchase answer to see full attachment

Don't use plagiarized sources. Get Your Custom Essay on
Army Transportation and Aviation Logistics School Java Programming Java assignment ……………………………………………………………..
For $10/Page 0nly
Order Essay
Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper