CHEgg A Lawn Care company that provides mowing and fertilizing services needs a program to help them manage their business. Write a program that will calculate and display the cost of a job based on the services performed and the size of the yard. Your program should first display a menu prompting the user for the services rendered, then prompt the user for the size of the yard in acres. Next, your program should calculate and display the cost of the selected service. The cost of each service is calculated using the formulas below. Cost of Mowing Service = Size of Yard in Square Yards * 0.01 Cost of Fertilizing Service = Size of Yard in Square Yards * 0.015

Respuesta :

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");

}

}

}

}

ACCESS MORE
EDU ACCESS
Universidad de Mexico