Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with the incorrect answers 1. Specify the variable type: num, i, iSquared, calc a. num variable type: primitive variable b. i race

Please help me with the incorrect answers

image text in transcribed
1. Specify the variable type: num, i, iSquared, calc a. num variable type: primitive variable b. i race through the program below to determine what it does. You will complete two program traces, first variable type: ( primitive variable sing the lowest value in the range of random numbers generated for num, and next using the highest alue in the range of random numbers generated for num. To assist your understanding, create tracing c. iSquared iagrams on a piece of paper to show what is stored in each variable as the program executes. You should variable type: ( primitive variable how each of the following variables: d. calc variable type: primitive variable num (lowest possible value and highest possible value) calc (using low value for num and high value for num) 2. variable: num a. specify the lower end of the range of possible values: 4 iSquared b. specify the upper end of the range of possible values: 9 Make sure your diagram is drawn properly to demonstrate a reference variable as opposed to a primitive ariable. In addition, show what is displayed on the screen. 3. Tracing table: i, iSquared, calc For each variable in the table, trace the variable's value through each iteration of the loop. The rows represent the multiple iterations. The values in each row replace the variable's value just submit your answers online below. Comments are left out to assess your understanding. above it during program execution. 1st trace 2nd trace iSquared calc - use num from calc - use num from mport java. util. Random; answer 2a answer 2b ublic class Tracing public static void main (String args) 32 Random rand = new Random () ; 30 50 int num = rand. nextInt (6) + 4; 16 75 int calc = 0; 25 107 X int iSquared; 36 115 x 146 X for (int i = 0; i

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

More Books

Students also viewed these Programming questions