Question: Java Done in Excel. For each question, you need to show:-variables involved. -variables type (i.e. int double, ...etc) -initial value -run each instruction and modify

Java Done in Excel.

For each question, you need to show:-variables involved. -variables type (i.e. int double, ...etc) -initial value -run each instruction and modify the content of each variable accordingly. You are required to show every instruction executed at each stage. -show the final value held by each variable after all instruction are executed. Important! You must use only the technique we covered in class. No other technique will be accepted. Important! use Excel to complete your answers. You need to create separate file for each answer: -Open Excel -Copy and paste the question on the sheet. -Start your answer to the right side using the area to include variables, type, Initial Values, code executed and the effect on involved variables, and Final Values -Upload your solution and then move on to next question

Question 1:

.

.

double price = 1000.00;

double discountRate = 0.05;

double finalPrice = 0.0;

if(price > 500.00)

finalPrice = price * discountRate;

else

finalPrice = price;

Question 2

.

.

int number = 5;

int factorial = 0;

int i = 1;

while(i

{

if(number == 0)

{

factorial = 1;

i = number + 1;

}//end if

else

factorial = factorial * i;

i++;

}//end while i

.

.

Sample Answer Needs to be done in Excel see below:

Java Done in Excel. For each question, you need to show:-variables involved.

quiz1_sample.xlsx File Edit Insert Format Help Download & Share Calibri 11 B I U 5 . - fx done=1 A B E F . 1 J K M N O Q R S T U V w Y G done 1 int i = 5; li int 2 int int ol 3 int j = 0; D Var Type L.V. j

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!