Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

needs to be word document please in JAVA https://imgur.com/a/wmUMo Question 1: Write an if statement that assigns 13 to num when var is equal to

needs to be word document please in JAVAimage text in transcribedimage text in transcribed

https://imgur.com/a/wmUMo

Question 1: Write an if statement that assigns 13 to num when var is equal to 4 Quesiton 2: Write an if-else statement that assigns 9.5 to dec2 when dec1 is equal to 3.2, otherwise dec2 is 4.5 Question 3: Using the following chart, write an if-else-if statement that assigns 4%, 5%, or 6% to commission rate, depending on the value in sales Sales Up to $15,000 $15,000 to $40,000 Over $40,000 Commission Rate 4% 5% 6% Question 4: Write nested if statement that perform the following tests: If amount1 is greater than or equal to 15,000 and amount2 is greater than and equal to 20,000, and if amount1 is less than amount2 then display the message: "Sale the product 2 better" otherwise display the message: "Sale the product 1 better". But if amount1 is less than 15,000 or amount2 is less than 20,000 then display the message: "Sale is not good" Question 5: Write an if statement that prints the message The grade is B" if the average is greater or equal to 80 and less than and equal to 90 Question 6: Write an if statement that prints the message 'The value is valid" if the temparature is within the range -32 through 273 Question 7 Notes: In java, to compare 2 Strings, we use the method compareTo) string1.compareTo(string2)-0 string! and string2 are the same string1.compareTo(string2) > 0 stringl is greater thant string 2 string1.compareTolstring2)

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions