subject

// This class discounts prices by 10% public class DebugFour4
{
public static void main(String args[])
{
final double DISCOUNT_RATE = 0.90;
int price = 100;
double price2 = 100.00;
tenPercentOff (price DISCOUNT_RATE);
tenPercentOff (price2 DISCOUNT_RATE);
}
public static void tenPercentOff(int p, final double DISCOUNT_RATE)
{
double newPrice = p * DISCOUNT_RATE;
System. out. println("Ten percent off " + p);
System. out. println(" New price is " + newPrice);
}
public static void tenPercentOff(double p, final double DISCOUNT_RATE)
{
double newPrice = p * DISCOUNT_RATE;
System. out. println("Ten percent off " + p);
System. out. println("New price is " + newprice);
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Which type of excel chart should be used to track students’ progress on test grades? line column bar pie
Answers: 2
You know the right answer?
// This class discounts prices by 10% public class DebugFour4
{
public static void main...
Questions
question
English, 09.03.2021 16:00
question
Mathematics, 09.03.2021 16:00
question
Mathematics, 09.03.2021 16:00
question
Arts, 09.03.2021 16:00
Questions on the website: 13722367