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
Write a function nexthour that receives one integer argument, which is an hour of the day, and returns the next hour. This assum
Vinvika [58]

Answer:

The function in C is as follows:

int nexthour(int tme){

   tme = tme%12 + 1;

   return tme;

}

Explanation:

This defines the function

int nexthour(int tme){

Ths calculates the next hour using % operator

   tme = tme%12 + 1;

This returns the next hour

   return tme;

}

5 0
2 years ago
Assume the existence of a Window class with a function getWidth that returns the width of the window. Define a derived class Win
Pepsi [2]

Answer:

Following are the code in the C++ Programming Language.

//define class and inherited the parent class

class WindowWithBorder : public Window

{

//access modifier

private:

//set integer variable

int borderWidth;

//set integer variable

int windowWidth;

//access modifier

public:

//definition of the constructor that accept an integer type argument

WindowWithBorder(int);

//definition of the function

int getUseableWidth();

};

//set constructor outside the class

WindowWithBorder::WindowWithBorder(int y)

{

//initialization in integer variable from function

windowWidth = getWidth();

//initialization in integer variable from the argument list

borderWidth = y;

}

//set function from outside the class

int WindowWithBorder::getUseableWidth()

{

//return output

return windowWidth - borderWidth;

}

Explanation:

Here we define a class "WindowWithBorder" which inherit their parent class "Window", inside the class.

  • Set two integer data type private variables "borderWidth" and "windowWidth".
  • Write the definition of the "windowWidth" class constructor that accept the integer type argument list.
  • Write the definition of the function "getUseableWidth()" which is integer type.

Then, we define constructor outside the class which accept the integer type argument list "y" inside it.

  • we initialize in the variable "windowWidth" from the function "getWidth()".
  • Initialize in the variable "borderWidth" from the argument of the constructor.

Finally, we define function in which we perform the subtraction of the variable "windowWidth" from the variable "borderWidth" and return it.

5 0
3 years ago
Pick the correct statements regarding cell references.
shusha [124]

Statement two and three is correct.

Statement 1 is incorrect. A relative reference changes when a formula is copied to another cell while Absolute references remain constant. However, it is safe to say that an absolute address can be preceded by a $ sign before both the row and the column values. It is designated by the addition of a dollar sign either before the column reference, the row reference, or both. Statement C is also correct. A mixed reference is a combination of relative and absolute reference and the formula (= A1 + $B$2) is an example of a mixed cell reference.

7 0
3 years ago
Read 2 more answers
A stigma is
mario62 [17]
The answer to your question is A. A mark of social disgrace that sets tyre deviant apart from the rest of society. Hope I helped.
8 0
3 years ago
Read 2 more answers
Write a while loop that prints userNum divided by 4 (integer division) until reaching 2. Follow each number by a space. Example
Slav-nsk [51]

Answer / Explanation:

#include <iostream>  

using namespace std;

int main()  

{    

 int userNum = 0;  

  userNum = 20;    

  cout << userNum << " ";

  while (userNum > 1)    

  {

     userNum = userNum/2;

     cout << userNum << " ";    

  }    

  cout << endl;  

  return 0;  

}

However, we should note that the above codes divides properly but when it gets to 0, it will always give output as 0 instead of terminating the program.

Hence to make it terminate, we include:

while (userNum > 1)    

{

  cout << userNum << " ";    

  userNum = userNum/2;

}    

The above code alternatively should be replaced with int userNum = 0;  .

Also, for the sake of industry best standard and the general principle, we can say:

The general principle is:

while ( <conditional> )

{

  // Use the data

  // Change the data as the last operation in the loop.

}

A for loop provides natural placeholders for these.

for ( <initialize data>; <conditional>; <update data for next iteration> )

{

  // Use the data

}  

If you were to switch to using a for loop, which I recommend, your code would be:

for ( userNum = 20; userNum > 0; userNum /= 2 )

{

  cout << userNum << " ";

4 0
2 years ago
Other questions:
  • Cyber security includes which of the following?
    7·1 answer
  • Enlist the various data analysis methods for study of Infrasonic waves, Seismic waves, Earthquake prone areas and how AI can be
    15·1 answer
  • Gmod how to make someone admin on a lan server
    6·2 answers
  • "A user reports that the corporate web server cannot be accessed. A technician verifies that the web server can be accessed by i
    8·1 answer
  • True or False? At any point in time, an open file has a current file pointer indicating the place where the next read or write o
    15·1 answer
  • Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The fi
    5·1 answer
  • Which of the following is an example of a trade journal?
    7·2 answers
  • Which of the following statements are true regarding models? Select 3 options.
    11·1 answer
  • What read a page on website​
    15·1 answer
  • What plugs into this?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!