subject

Import static java. lang. system.*; import java. util. scanner; public class sales{ //you haven't learned about "static" yet but take it on faith that it is needed //we'll discuss in future classes what it actually means and why you need it //create a private static variable for price //create a private static variable for discountrate - it's an integer //create a private static variable for tax // the sale method takes in no parameters // there are 3 print satements and the method returns the final sale price public static double sale(){ //write your code here. use the word doc example as a guide to what the print statements //should look like. don't forget the "return" statement. } /* *the main method is what is executed when the "run" button is clicked. *it is necessary, in this case, for the program to be tested. *actually study this code and trace through it to see how the scanner is used to assign * values to the variables. also pay attention to the use of print, println and \n to cause the * output to be formatted the way it is in the example. */ public static void main(string[] args){ scanner kb = new scanner(system. in); system. out. print(" enter a price: "); price = kb. nextdouble(); system. out. println(price + "\n"); system. out. print("what is the tax rate? "); tax = kb. nextdouble(); system. out. println(tax); discountrate = (int)(math. random() * 40); system. out. println("result returned is " + ; } } can anyone with this

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
question
Computers and Technology, 22.06.2019 16:10
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
You know the right answer?
Import static java. lang. system.*; import java. util. scanner; public class sales{ //you haven't...
Questions
question
Mathematics, 26.05.2021 05:00
question
Computers and Technology, 26.05.2021 05:00
question
Mathematics, 26.05.2021 05:00
question
Mathematics, 26.05.2021 05:00
question
Mathematics, 26.05.2021 05:00
Questions on the website: 13722365