Answer:
Explanation:
Complete question:
Fill in the blanks
One or more parties may terminate an agency relationship by placing into the agreement a time period for termination. When that time ,___1______the agency ends. In addition, the parties can specify that the agency is for a particular____2______ . Once that is achieved, the agency ends. Alternatively, the parties can include a specific event as a trigger for termination; once that event,_____3______ the agency ends. The parties can terminate an agency relationship prior to any of the preceding events by ______4_________agreement, or revocation_____5______ by individual party.
Answer
1) lapses
(2) purpose
(3) occurs / begins
(4) mutual
(5) either
Answer:
import java.util.*;
public class Main {
public static void main(String[] args) {
double milesPerGallon = 0;
int totalMiles = 0;
int totalGallons = 0;
double totalMPG = 0;
Scanner input = new Scanner(System.in);
while(true){
System.out.print("Enter the miles driven: ");
int miles = input.nextInt();
if(miles <= 0)
break;
else{
System.out.print("Enter the gallons used: ");
int gallons = input.nextInt();
totalMiles += miles;
totalGallons += gallons;
milesPerGallon = (double) miles/gallons;
totalMPG = (double) totalMiles / totalGallons;
System.out.printf("Miles per gallon for this trip is: %.1f\n", milesPerGallon);
System.out.printf("Total miles per gallon is: %.1f\n", totalMPG);
}
}
}
}
Explanation:
Initialize the variables
Create a while loop that iterates until the specified condition is met inside the loop
Inside the loop, ask the user to enter the miles. If the miles is less than or equal to 0, stop the loop. Otherwise, for each trip do the following: Ask the user to enter the gallons. Add the miles and gallons to totalMiles and totalGallons respectively. Calculate the milesPerGallon (divide miles by gallons). Calculate the totalMPG (divide totalMiles by totalGallons). Print the miles per gallon and total miles per gallon.
Answer:
B
Explanation:
Keep only what is used. Remove all unnecessary items. Red tag these items for review.