Question: Question 2 To compile a project without running it, you can use the ________________ command. 2 points Question 3 The operators that you use to
Question 2 To compile a project without running it, you can use the ________________ command. 2 points Question 3 The operators that you use to compare values are called ________________ operators. 2 points Question 4 Given a double variable named total with a value of 62.5 and an integer variable named quantity with a value of 4, what will the value of price be after you execute this statement? double price = total / quantity; a. 15.6 b. 15.625 c. 16 d. 15.62 2 points Question 5 Code example 2-1 import java.util.Scanner; public class InvoiceApp { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String choice = "y"; while (choice.equals("y")) { System.out.print("Enter subtotal: "); double subtotal = sc.nextDouble(); double salesTax = subtotal * .0875; double invoiceTotal = subtotal + salesTax; String message = "Subtotal = " + subtotal + " " + " Sales tax = " + salesTax + " " + "Invoice total = " + invoiceTotal + " " System.out.println(message); System.out.print("Continue? Enter y or n: "); choice = sc.next(); } } } (Refer to code example 2-1.) If the user enters 100 the first time the while loop is executed, what will the program display at the console? a. Subtotal: 100.0 Sales tax: 8.75 Invoice total: 108.75 b. Subtotal = 100.0 Sales tax = 8.75 Invoice total = 108.75 c. Subtotal = 100.0 Sales tax = 8.75 Invoice total = 108.75 d. Subtotal = 100.0 Sales tax = 8.75 Invoice total = 108.75
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
