Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1 (5 points) Write a java statement to do each of the following: 1. Declare a variable named result of type integer. 2. Declare a

image text in transcribed

image text in transcribed

image text in transcribed

Q1 (5 points) Write a java statement to do each of the following: 1. Declare a variable named result of type integer. 2. Declare a variable named GPA of type double, and assign a value of 3.5 to it. (do it in single statement) 3. Declare a variable named GPA of type double, and assign a value of 3.5 to it. (do it in double statement) 4. Define a constant named AVERAGE of type double of value 4.2. 5. Assign a value of 5.6 to a variable named radius. 6. Request the user to inter a value for variable x. 7. print ("Corona Go! :)" on screen. 8. Increment a variable y by 6 . 9. Decrement variable x by 1 . 10. Multiply variable z by 2 and save the value in the same variable. PAAET: College of Technological Studies Computer Engineering Department Q2 (2 points): what is the value of x according to the calculation: x=(4+23)+(16/4+1)(3+8)/4 Q3 (3 points): Having x=2,y=3,z=0 What is the value of x,y,z after each of the following calculation a. x=4 b. z=4+x++; c. z=y+4; d. z=6+x; e. z=++y+x++; f. z=x5; PAAET: College of Technological Studies Computer Engineering Department Q4 (5 points): Trace the following java program and write the output (assume the user inters number 4)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions