Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:50, jumoke26
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors. java.
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, BluedragonKBT44
The gene form of a trait is called a(n) 
Answers: 2
image
Computers and Technology, 24.06.2019 12:50, neptunesx
Write a new lc-3 trap subroutine (i. e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i. e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e. g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e. g. b0000 0000 0000 0111 =
Answers: 3
image
Computers and Technology, 24.06.2019 22:30, anselmojohn4370
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
Answers: 1
Do you know the correct answer?
Import static java. lang. system.*; import java. util. scanner; public class sales{ //you haven't...

Questions in other subjects:

Konu
Mathematics, 24.11.2020 19:20
Konu
Physics, 24.11.2020 19:20
Konu
Computers and Technology, 24.11.2020 19:20