Uploaded by shahadyammahi

G11 ASP Tasks

advertisement
G11 ASP
Computer Science
TEACHER NAME
FEDA’A AL AZZEH
2019 2020
TASK 1/30
Tab 1
IN THIS TASK:
Create a Java program and declare three int variables:
x = 10, y = 11, z = -3 Then write each of the following
expressions and find out the result of each :
1.
2.
3.
4.
5.
6.
7.
8.
x>z && x>y
z<x && y>x
z>x && x>y
x>z || x>y
if(z<x || y>x)
if(z>x || x>y)
if(!(x>z))
if(!(z>y))
TASK 2 /20
• Write Java code that declares
three variables and print out
the value of the variable that
contains the biggest value.
Tab 2
IN THIS TASK:
TASK 3 /30
IN THIS TASK:
Write a Java program that assigns a student’s mark (of
any value) to variable mark and prints an output using
the conditions given below:
Printed output
Grade A
Grade B
Grade C
Grade D
Fail
INVALID MARK
Tab 3
Condition
Mark between 90 and 100
Mark between 80 and 89
Mark between 70 and 79
Mark between 60 and 69
Mark less than 60
Mark more than 100 or negative
TASK 4 /20
IN THIS TASK:
Write a Java code that implements the following
flowchart using the proper logical operator. Note: make
sure to declare and initialize the variables needed in the
task.
Tab 4
Download