You are on page 1of 2

Assignment 1 [CPA – Grade 9] Hard Deadline: 24th September, 2018

(For all sections)


1. That prints the following message: Good Morning!
2. That prints the following message: Good Morning YourName!
[YourName : is stored in a variable of type String]
3. That prints your initials using nine rows of asterisks.
4. That concatenates three strings and prints them.
Declare the three Strings as “Bob” “The” and “Builder”.
5. That performs the following operations on two integer numbers
Addition, Subtraction, Division, Multiplication, Modulus
6. That performs the following operations on two double (decimal) numbers
Addition, Subtraction, Division, Multiplication, Modulus
Output format:
Addition: (Answer of addition)
Subtraction: (Answer of subtraction)
… so on..
7. That finds the value of X, from the given values of the two sides of a triangle.

8. That checks whether the input values of A, B and C forms a valid Right-angled triangle or
not.
(Use Math class)
9. That finds the area and circumference of circle (Use Math class)
10. That finds a to-the-power b, using Math class
11. That checks whether an integer is positive or negative or zero.
12. That checks whether the user is eligible for voting based on the age.
13. That finds the grade of a student based on average marks (of three subjects).
If average >90 : Grade A
If average >75 and <90 : Grade B
If average >55 and <75 : Grade C
Else Fail
14. That finds minimum and maximum of two numbers
15. That finds minimum and maximum of two numbers using Math class
16. That finds the absolute value of a number.
17. That finds the absolute value of a number using Math class
18. That demonstrates the use of all the functions of Math class, like:
Abs, round, ceil, floor, min, max, cos, sin, pow, sqrt, exp, log and random.

HOW TO WRITE/SUBMIT:
1. Perform the program using Notepad / Notepad++ editors and CMD. (Eclipse for Mac users)
2. Once the program executes properly, write the source code (program) in the Assignment
book. Take the screenshot of the output, print it and paste it below the code written in the
assignment book.
3. The assignment book is to be submitted to the teacher individually on or before the
deadlines mentioned. The submissions made after Hard deadline will result into deduction of
UT Marks.
4. Make sure that your assignment book is labeled with your name and section properly.

You might also like