1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksju [112]
4 years ago
11

Write an application for a lawn-mowing service. The lawn-mowing season lasts for 20 weeks. The weekly fee for mowing a lot less

than 400 square feet is $25. The fee for a lot that is 400 square feet or more, but fewer than 600 square feet, is $35 per week. The fee for a lot that is 600 square feet or over is $50 per week. Prompt the user for the length and width of a lawn, and then print the weekly mowing fee, as well as the 20-week seasonal fee. Save the class as Lawn.java.
Computers and Technology
1 answer:
jenyasd209 [6]4 years ago
4 0

Answer:

// library

import java.util.*;

// class definition

class Main

{// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read inputs

      Scanner scr=new Scanner(System.in);

      System.out.print("Enter length of lawn:");

      // read the length of lawn

      int length=scr.nextInt();

      System.out.print("Enter width of lawn:");

      // read the width of lawn

      int width=scr.nextInt();

      // find area of lawn

      int area=length*width;

      //if area is less than 400

      if(area<400)

      {// Weekly mowing fee

          System.out.println("Weekly mowing fee is:$25");

          // seasonal fee

          System.out.println("20-week seasonal fee is:$"+(25*20));

      }

      // if area >=400 and area <600

      else if(area>=400 && area<600)

      {

         // Weekly mowing fee

          System.out.println("Weekly mowing fee is:$35");

          // seasonal fee

          System.out.println("20-week seasonal fee is:$"+(35*20));

      }

      // if area >=600

      else if(area>=600)

      {

         // Weekly mowing fee

          System.out.println("Weekly mowing fee is:$50");

          // seasonal fee

          System.out.println("20-week seasonal fee is:$"+(50*20));

      }

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the length and width of lawn from user with the help of scanner object. Find the area of the lawn.If the area if less than 400 then Weekly mowing fee  is $25 and find the 20-week seasonal fee by multiply 25 with 20.If the area is greater than 400 and less than 600 then Weekly fee is $35 and seasonal fee  will be 35*20.if the area is greater than 600 then Weekly fee is $50 and seasonal fee will be 50*20.

Output:

Enter length of lawn:15                                                                                                    

Enter width of lawn:12                                                                                                    

Weekly mowing fee is:$25                                                                                                  

20-week seasonal fee is:$500

You might be interested in
Discuss the types of data that business might collect and how the business could use that data to drive decision-making in a spe
Rudik [331]

Answer:

Answered below

Explanation:

A business such as an online store like Amazon can collect user data like name, address, mouse clicks on products, how long users stay on page viewing a particular product, marital status, education and many more.

These data are used by these businesses to drive decision-making that enhances the sale of their goods. For instance, adverts and search alternatives about a particular good can be shown to people who have looked at them before. A newly married or pregnant woman would be shown baby products etc.

3 0
3 years ago
Containers for contaminated sharps must have several characteristics. What’s missing from the list? PuContainers for contaminate
Nadya [2.5K]
All sharps containers must be stored upright,be puncture-resistant, be labeled or color-coded red & leakproof on both the sides & the bottom! The last one is the one missing!
4 0
3 years ago
Read 2 more answers
What types of roles are there as a webmaster?
Nuetrik [128]
<span> PHP, ASP, and Javascript. They handle the technical aspects </span>
6 0
3 years ago
Read 2 more answers
Router 1 is configured with static NAT. Addressing on the router and the web server are correctly configured, but there is no co
marin [14]

Answer:

The router NAT configuration has an incorrect inside local address.

Explanation:

The term Inside in a <em>Network Address Translation (NAT) </em>context refers to networks owned by an organisation that must be translated. When NAT is configured, hosts within this network have addresses in one space (known as the local address space). These hosts appear to those users outside the network as being in another space (known as the global address space).

The term Outside refers to those networks to which the stub network connects, and which are not under the control of an organisation. Also, hosts in outside networks can be subject to translation, and can thus have local and global addresses

7 0
3 years ago
They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
VLD [36.1K]

Answer:

They predicted another cold day in Seattle and another windy day in Seattle.

4 0
3 years ago
Other questions:
  • What type of rain happens when cold air meets warm air
    14·1 answer
  • A base class named Garden contains a private field width and a property public int Width that contains get and set accessors. A
    11·1 answer
  • How does Hadoop work? It breaks up Big Data into multiple parts so each part can be processed and analyzed at the same time on o
    5·1 answer
  • Whats the best c++ compiler
    9·1 answer
  • Explain with the help of an example that family background affects the entrepreneurial behaviour of people
    12·1 answer
  • Creating a chart using a spreadsheet Chart Wizard involves four steps. Which is the last step?
    6·1 answer
  • Select the layer of the OSI model that is responsible for reformatting, compressing, and/or encrypting data in a way that the ap
    14·1 answer
  • A finally clause will execute:
    8·1 answer
  • What is an infrastructure dedicated to one organization
    13·1 answer
  • Beginning in cell B21, complete the series of substitution values ranging from $35 to $45 in increments of $2.50 vertically down
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!