let's say they catch-up to each other after t hour.
so
in t hour distance travelled by Renee
d = speed × time = 50t
in t hour distance travelled by Kim
d = speed × time = 60(t-1) + 0×1 = 60(t-1)
Note: here kim didn't covered any distance in first hour and in rest t-1 hour it travelled all distance
now.as distance travelled by both is same so
60(t-1) = 50t
60t -60 = 50t
adding 60 both sides
60t = 50t+60
subtracting 50t both sides
60t -50t = 50t+60 - 50t
10t = 60
dividing by 10 both sides
t = 60/10 = 6
so in 6 hour both will catch-up to each other
Answer:
Rob lox, Sub nautica, Phasmo phobia, Albion Online, fnf.
Explanation:
27 mujeres
18 hombres
Mira:
60% * 45 = 2,700
2,700/100= 27
Si el 60% son mujeres, entonces
45-27=18 hombres
Shareder Is the answer I put.
Answer:
- import java.util.Scanner;
- public class MealPriceCalculation{
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
- System.out.print("Enter meal price: ");
- double meal = input.nextDouble();
- System.out.print("Enter tip: ");
- double tip = input.nextDouble();
-
- calculatePrice(meal,tip);
- calculatePrice(meal,(int)tip);
-
- }
-
- public static void calculatePrice(double meal, double tip){
- System.out.println("Total meal price: $" + (meal + tip) );
- }
-
- public static void calculatePrice(double meal, int tip){
- System.out.println("Total meal price $" + (meal+tip));
- }
- }
Explanation:
The solution code is written in Java.
Overload methods are the methods that share the same name but with different method signature. In this question, we create two overload methods calculatePrice (Line 17-23). One version will accept parameter meal and tip in double type and another will accept parameter meal in double but tip in integer. Both of this method are doing the same job which is just printing the total of meal.
In the main program, create a Scanner object and use it to prompt user to input meal price and tip (Line 6-10). Next call the calculatePrice method for twice. In the first time, pass meal and tip as double type data to calculatePrice method (Line 12). In the second time, pass meal in double but tip in integer to the method. Only the method with parameter list that match the argument data type will be implemented and output the total meal price.