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 04:00
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
Why would a programmer use the logical operator and in an if statement? a: when an action is to be taken that requires both conditions to be falseb: when an action is to be taken that requires both conditions to be truec: when an action is to be taken that requires the first condition to be falsed: when an action is to be taken that requires the second condition to be truei took the test and the answer is b.
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
You know the right answer?
Import static java. lang. system.*; import java. util. scanner; public class sales{ //you haven't...
Questions
question
Social Studies, 14.09.2019 00:30
Questions on the website: 13722361