Answer:
Check below for answer
Explanation:
import java.util.Scanner;
class Chegg {
public static void main(String[] args) {
Scanner myObj = new Scanner(System.in);
System.out.println("Enter the service offered, type 1 for mowing and 2 for fertilizing");
int service = myObj.nextInt();
System.out.println("Enter the size of yard covered in acres");
int yardSize = myObj.nextInt();
if (service ==1) {
int x = 0.01 * 4840 * yardSize
System.out.println("cost of mowing service is " + x);
}
elseif (service ==1) {
int y = 0.015 * 4840 * yardSize
System.out.println("cost of fertilizing service is " + y);
else {
System.out.println("Invalid input");
}
}
}
}