Answer:
// here is code in Java.
// package
import java.util.*;
// class definition
class Main
{
// method that return sum of two sale value
public static int Add(int euroSales,int asiaSales)
{
// return the sum
return euroSales+asiaSales;
}
//main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// variables
int euroSales=100;
int asiaSales=150;
int eurasiaSales;
// call the function
eurasiaSales=Add(euroSales,asiaSales);
// print the sum
System.out.println("total sale is:"+eurasiaSales);
}catch(Exception ex){
return;}
}
}
Explanation:
Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.
Output:
total sale is:250
Define variables
left is l
right is r
Ask input
left or right
Ask input value
Equate l or r to the input value
Show ladder with steps equal to input value and in the side of input variable
Answer:
a
Explanation:
Megan doesn't have a registered business. She can't claim insurance
It encourages users to revisit your website.
Answer:
1)
officeAC = new AirConditioner();
officeAC.turnOn();
2)
officeAC = new AirConditioner();
officeAC.turnOn();
officeAC.setTemp(69);
Explanation:
1)
In the first statement a new object of the class AirConditioner whose reference is assigned to the officeAC. new is a keyword which creates an object of the class.
Next statement uses the method turnOn(). Reference to the new object officeAC is used to invoke this method turnOn().
2) The first two statements works the same as in 1)
The last statement invokes a method setTemp() using the reference variable and passes the value 69 to this method to set the desired temperature.