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
Paladinen [302]
2 years ago
9

You are to calculate the property tax for tax payers. You will ask the county tax clerk if they want to run the program and init

iate a loop that runs the program if the county clerk inputs a 1. When the county clerk chooses to run the program, you will ask the county tax clerk to input the lot number and assessed value of the house. Each property is taxed at a rate of 5% of the assessed value. The program will end when the county clerk enters a value of 0 when prompted by your program to either run the program again or quit. Use a while loop to validate the lot number to make sure that it falls between the range of 0 and 999999. When the clerk enters an invalid lot number, display a message that echoes the invalid number entered, and a reminder of the value range of numbers for a lot number. You are to print the lot number, assessed value, and property tax. After the program ends, display the total assessed values, and property taxes calculated, and average property tax
Computers and Technology
1 answer:
andre [41]2 years ago
8 0

Answer:

Explanation:

The following code is written in Java. It creates the loop as requested and validates the information provided before continuing, if the information is invalid it prints "Invalid Information to the screen" and asks the user to enter the information again. Finally, outputing all the requested information at the end of the program. The code has been tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int totalValues = 0;

       int totalTaxes = 0;

       int count = 0;

       while(true) {

           int lotNumber, value;

           double tax;

           System.out.println("Would you like to add an Entry: 1=Yes 0=No");

           int answer = in.nextInt();

           if (answer == 1) {

               System.out.println("Please enter lot number: ");

               lotNumber = in.nextInt();

               if ((lotNumber >= 0) && (lotNumber <= 999999)) {

                   System.out.println("Please enter assessed value: ");

                   value = in.nextInt();

                   tax = value * 0.05;

                   System.out.println("Lot Number: " + lotNumber);

                   System.out.println("Property Value: " + value);

                   System.out.println("Property Tax: " + tax);

                   totalTaxes += tax;

                   totalValues += value;

                   count += 1;

               } else {

                   System.out.println("Invalid Lot Number");

               }

           } else {

               break;

           }

       }

       int average = totalTaxes / count;

       System.out.println("Total Property Values: " + totalValues);

       System.out.println("Total Property Taxes: " + totalTaxes);

       System.out.println("Average Property Tax" + average);

   }

}

You might be interested in
Xercise 1<br>1.<br>What is system? Explain the components of system in brief.​
noname [10]

Answer:

A system is a collection of elements or components that are organized for a common purpose. ... A computer system consists of hardware components that have been carefully chosen so that they work well together and software components or programs that run in the computer.

Explanation:

4 0
2 years ago
WILL UPVOTE NEED ANSWERS ASAP i have till 4:30
deff fn [24]
B. Summer monsoons bring heavy rainfall and winter monsoons create dry and arid conditions.
6 0
3 years ago
Which of the following ""invisible"" marks represents an inserted tab?
Pachacha [2.7K]

Answer:

Easy peasy, if you open Microsoft word and you click up at the top and you click the symbol as shown in A, then you click on inserted tab it will show up as B which is  → symbol

So the answer is B  →.

4 0
3 years ago
1.Which of the serves as the basis for determining whether an object has moved or not?
Harrizon [31]

Answer:

1. b

2. c

3. b

4. d

5. a

(hope this helped)

4 0
2 years ago
Who is he can anyone help me​
34kurt
This person is Elon Musk, the owner of Tesla :)
5 0
2 years ago
Read 2 more answers
Other questions:
  • What is a negative impact of digital communication
    6·1 answer
  • What are some ways to accept data typed into a cell? Check all that apply.
    15·1 answer
  • What is the name used for the integrated program development environment that comes with a Python installation?
    5·1 answer
  • Write an Enlistee class that keeps data attributes for the following pieces of information: • Enlistee name • Enlistee number Ne
    7·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • It is necessary tto save updates often when working in google docs? True or false
    11·2 answers
  • What is the command to list the contents of directors in Unix- like operating system
    10·1 answer
  • Which of the following is NOT true about procedural abstraction?
    9·1 answer
  • Maria is creating a program where the user will enter their name to begin. What kind of variable should be used for the user’s n
    15·2 answers
  • Please solve the ones you can. Solving Both will be appreciated. thank you
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!