Final answer:
To design a modular program that asks for the actual value of a piece of property and displays the assessment value and property tax, you can use functions.
Step-by-step explanation:
The correct answer is option B. To design a modular program that asks for the actual value of a piece of property and displays the assessment value and property tax, you can use functions. Here is an example of how the program can be structured:
- Create a function called calculateAssessmentValue that takes the actual value as input and returns the assessment value (which is 60% of the actual value).
- Create another function called calculatePropertyTax that takes the assessment value as input and returns the property tax (which is 64 cents for each $100 of the assessment value).
- In the main part of the program, ask the user for the actual value of the property.
- Call the calculateAssessmentValue function with the actual value as input and store the result.
- Call the calculatePropertyTax function with the assessment value as input and store the result.
- Display the assessment value and property tax to the user.
By using functions, you can separate the different computations into independent parts, making the program modular and easier to understand and maintain.
The correct answer is to design a program that calculates the assessment value and property tax based on the actual value of a property. In the first part, the program should create a modular flowchart without using classes.
Instead, it will utilize functions to prompt for the actual value of property and then display the calculated assessment value and property tax. In the second part of the program, enhancements are made to include a Property class, which will contain fields such as yearBuilt, streetAddress, ownerFirstName, ownerLastName, size, and homeValue.
The class will include constructors and methods for accessing the data and calculating taxes based on the homeValue.