write a program that determines the number of years it will take a home to double in value given the current value of the home and the predicted appreciation rate.

Answers

Answer 1

The program that determines the number of years it will take home to double in value is given below,

Example X

interleaved input and output with inputs 200000 and 0.042

Enter home value:200000

Enter appreciation rate (3.9% enter as 0.039):0.042

It will take about 17 years to double in value.

Example Y

interleaved input and output with an invalid input value:

Enter home value:20000000

Enter appreciation rate (3.9% enter as 0.039): unknown

Unexpected value: unknown

Algorithm

For example, for a home valued at $200,000 and a predicted appreciation rate of 3.9%, we could start writing the code as:

  homeValue = 200000.0;    

  years = 0;

  //after one year

  homeValue = homeValue + homeValue * 0.039;  

  years++;

  //after two years

  homeValue = homeValue + homeValue * 0.039;

  years++;

  //after three years

  homeValue = homeValue + homeValue * 0.039;

  years++;

after 19 years the value is anticipated to be about $206,868, so it takes 19 years to double.

Construct the class HomeValue. Write a method within the class that returns the number of years it will take for the worth of the home to double, taking the present home value and the expected appreciation rate as inputs of type double.

Hence, the java program is given.

To learn more about the Java Program from the given link

https://brainly.com/question/26642771

#SPJ4


Related Questions

mohammed needs to open a firewall port so that web traffic can be passed through the firewall. what protocol is used for web pages, and on which port does it work?

Answers

HTTP protocol with port number 80 is used to open a firewall port

What is an HTTP protocol?

An application-layer protocol called Hypertext Transfer Protocol (HTTP) is used to send hypermedia documents like HTML. Although it was created for web browser and web server communication, there are other uses for it as well.

Explanation :

Your computer sends network data identifying itself as traffic intended for port 80 of the web host whenever you want to view a website. The firewall on the web server is configured to allow incoming traffic to port 80, so it acknowledges your request (and the web server, in turn, sends you the web page in response). 

How HTTP protocol controls the network traffic ?

By controlling network traffic, a firewall can assist in protecting your computer and data. By preventing unwanted and unsolicited incoming network traffic, it accomplishes this. By scanning this incoming traffic for malicious content like hackers and malware that could infect your computer, a firewall verifies access.

Thus we can conclude that at port 80 HTTP protocol is used

https://brainly.com/question/12921030

#SPJ4

question 1 for an assignment you wrote the method sort largest depth in the class quakesortinplace to sort earthquakes by their depth from largest depth to smallest depth using the selection sort algorithm. modify this method to do exactly 50 passes and then modify testsort to run this method on the file earthquakedatadec6sample2.atom. the file may not be completely sorted as there are more than 50 quakes in the file. after running your program of 50 selection sort passes on this file, what is the depth of the last earthquake in the arraylist?

Answers

ArrayList is a class in the java.util package and a component of the Java collection system. In Java, it offers us dynamic arrays.

The depth of the last earthquake in the arraylist exists -100000.00.

What is meant by arraylist?

ArrayList is a class in the java.util package and a component of the Java collection system. In Java, it offers us dynamic arrays. Although it might be slower than conventional arrays, it can be useful in programs that require a lot of array manipulation. Java contains a class like this.

A resizable array that is part of the java.util package is the ArrayList class. Built-in arrays have a fixed size, but ArrayLists have a dynamic size. An ArrayList can have elements added and removed as needed, which aids in memory management for the user.

The elements are kept in a dynamic array by ArrayList internally. Internally, LinkedList stores the elements in a double-linked list.

The depth of the last earthquake in the arraylist exists -100000.00.

To learn more about ArrayLists refer to;

https://brainly.com/question/26666949

#SPJ4

Iuanyware is a ________ application that is designed to run within a computer browser such as firefox, chrome, opera, or edge.

Answers

Iuanyware is a service program made to function inside of a web browser like Firefox, Chrome, Opera, or Edge.

What is IUanyWare?

All IU staff, faculty, and students have access to IUanyWare. You can stream the IU-licensed apps and software you need from anywhere, on any device, without having to download, install, or use a VPN for each one.

A service program called iuanyware is designed to run inside a web browser like Firefox, Chrome, Opera, or Edge.

There is a service called IUanyWare that all IU employees, faculty members, and students can use. You can stream the IU-licensed programs and software you needed, without having to install anything, regardless of where you are or what device you're using.

To learn more about ' IUanyWare' refer to

https://brainly.com/question/28940270

#SPJ4

write a sql statement to show the average item cost for each vendor. the output should list vendor company names, vendor phone numbers, and the average item cost

Answers

The SQL statement to show the average item cost of each vendor is avg(vendor_avg_item_cost).

GROUP BY Vendor_companyname, Vendor_phonenumber, Ven_avgcost

What is avg() function?

The syntax for the avg() function is as follows: SELECT AVG(column name) FROM table name; Data from a table can be retrieved using the avg() function and a SELECT query.

what is a GROUP BY statement in SQL?

Finding summary rows, such as "find the number of consumers in each country," is done with the GROUP BY statement, which groups rows with similar values. The COUNT(), MAX(), MIN(), SUM(), and AVG() aggregate functions are frequently used with the GROUP BY statement to group the result set by one or more columns.

Therefore, the SQL statement to show the average is avg().

To learn more about the SQL from the given link

https://brainly.com/question/27851066

#SPJ4

write a function called remove duplicates that accepts a list and returns a list containing the same elements in the same order but with duplicates removed. for example, if the argument is [7, 4, 2, 7, 2, 2, 9, 4], the returned list would be [7, 4, 2, 9].

Answers

The function that called remove duplicates that accepts a list and returns a list containing the same elements in the same order but with duplicates removed is def remove_duplicates(lst).

The method of obtaining the unique list from a list that may contain duplicates is the subject of this article. Remove duplicates from list procedure has a wide range of uses, thus understanding it is beneficial.

This is the simplest and quickest way to complete a specific activity. After eliminating the duplicates, it returns a dictionary that must be transformed into a list.

List in the beginning: [1, 2, 4, 2, 1, 4, 5]

[1, 2, 4, 5] is the list after deleting duplicate elements.

Depending on the elements contained in the list, its size, whether or not the element order should be retained, and the effectiveness of the removal method, duplicates can be removed from Python lists using a variety of techniques. These processes might be iterative, implement themselves using built-in functions, or import functionality from modules.

To know more about duplicates click on the link:

https://brainly.com/question/28609285

#SPJ4

a word wide web server is usually set up to receive relatively small messages from its clients but to transmit potentially very large messages to them. explain which type of arq protocol (selective reject, go-back-n) would provide less of a burden to a particularly popular www server? g

Answers

The data link layer protocol would provide less of a burden to a particularly popular world wide web server.

Similar to the ftp daemon, a World Wide Web server is a program that responds to an incoming tcp connection and offers a service to the caller. To serve various types of data, there are numerous variations of World Wide Web server software.

Automatic Repeat Request, also called Automatic Repeat Query, is the acronym for this. An error-control technique called ARQ is applied in two-way communication systems. To achieve reliable data transmission through an unreliable source or service, it is a collection of error-control protocols. These protocols are located in the OSI (Open System Interconnection) model's Transport Layer and Data Link Layer, respectively. When packets are determined to be corrupted or lost during the transmission process, these protocols are in charge of automatically retransmitting them.

To know more about world wide web click on the link:

https://brainly.com/question/13211964

#SPJ4

Other Questions
what component at the core of the erp system allows all business functions to access current and consistent data for operational decision making? group of answer choices general ledger database reports pos device If a nutrition facts label lists total carbohydrate as 12 grams, total sugar as 5 grams, and added sugar as 4 grams, then how many calories are provided from carbohydrates?. What is the force of gravity between two 50.0kg masses that are separated by 0.300m?3.71x10-8N5.59x10-7N2.78x104N1.85x10-6N I List two types of angle pairs: 14) 15) Consider the following equation of a parabola.y? + 4y = 8r + 4Step 1 of 3: Find the focus of the parabola. gabriel recently signed up for a website that reunites one with former classmates from elementary school. he is curious to see if many of his former classmates still look and act the same. research on stability and change would predict: the scale that captures the intensity of feelings toward a statement's claim or assertion because respondents are asked how much they agree or disagree with the statement is: for anyone that knows how to do this i only need help with these two questions-4x-1=-y solve for y-4y+20+3x=0solve for y a stock just paid a dividend of $4.81 and is expected to maintain a constant dividend growth rate of 4.5 percent indefinitely. if the current stock price is $63, what is the required return on the stock? managers tend to have a less specific definition of the population than do researchers because the researcher must use the description of the population precisely, whereas the manager uses it in a more general way. true false Discuss the differences between technical and adaptive responses to workplace dilemmas by sharing concepts from Table 7.2. A person invests $9000 at 3% interest compound annually for 4 years and then invests the balance (the $9000 plus the interest earned) in an account at 7% interest for 8 years. find the final value of the investment. Use point-slope form to write the equation of a line that passes through the point (-12,15) with slope 1. Choose the sentence with correct punctuation and the correct rule.Group of answer choicesI sent a postcard a letter and a package. NO COMMAS NEEDEDI sent a postcard, a letter, and a package. ITEMS IN A SERIESI sent a postcard, a letter, and a package. INDEPENDENT CLAUSES JOINED BY A COORDINATING CONJUNCTIONI sent a postcard, a letter, and a package. INTERJECTIONChoose the sentence with correct punctuation and the correct rule.Group of answer choicesWe left early, but didn't take her home. INDEPENDENT CLAUSES JOINED BY A COORDINATING CONJUNCTIONWe left early, but didn't take her home. INTRODUCTIONWe left early but didn't take her home. NEEDS NO COMMASWe left early, but didn't take her home. COORDINATE ADJECTIVESChoose the sentence with correct punctuation and the correct rule.Group of answer choicesWar and Peace, which has over 1000 pages is difficult to read. CONTRASTED ELEMENTSWar and Peace which has over 1000 pages is difficult to read. NO COMMAS NEEDEDWar and Peace which has over 1000 pages, is difficult to read. INTRODUCTIONWar and Peace, which has over 1000 pages, is difficult to read. NONRESTRICTIVE ELEMENTChoose the sentence with correct punctuation and the correct rule.Group of answer choicesI needed a break, so I took a vacation. INDEPENDENT CLAUSES JOINED BY A COORDINATING CONJUNCTIONI needed a break, so I took a vacation. INTRODUCTIONI needed a break so I took a vacation. NO COMMAS NEEDEDI needed a break, so I took a vacation. CONTRASTED ELEMENTSChoose the sentence with correct punctuation and the correct rule.Group of answer choicesI made a pie, not a cake. COORDINATE ADJECTIVESI made a pie, not a cake. CONTRASTED ELEMENTSI made a pie, not a cake. PREVENT A MISREADINGI made a pie not a cake. NO COMMAS NEEDED DATA ANALYSIS AND STATISTICS Outcomes and event probability A number cube is rolled three times. An outcome is represented by a string of the sort OEE (meaning an odd number on the first roll, an even number on the second roll, and an even number on the third roll). The 8 outcomes are listed in the table below. Note that each outcome has the same probability. For each of the three events in the table, check the outcome(s) that are contained in the event. Then, in the last column, enter the probability of the event. Event A: An odd number on each of the last two rolls Event B: An even number on the last roll Event C: An even number on the last roll or the second roll (or both) Explanation Check 000 0 0 OOE EEE O Outcomes OEO 0 0 EOO EEO EOE OEE 0 0 Probability 0 0 0 00 0/5 X Nikida V Espae use the data below make a frequency table take a picture of you frequency table and attach it to your answer marathon time Charice created a painting with an area of 63 square inches and a length of 7 inches. They create a second painting with an area of 81 square inches. It has the same width as the first painting. What is the length of the second painting? Q3. A 3500 kg van hits a 2500 kg car with a force of 1480 N [E].a) What force does the van experience? solve the system by graphing; y= -5/3x + 3 y= 1/3x - 3 Find the other endpoint of the line segment with the given endpoint and midpoint. Endpoint: (9,1) Midpoint: (-4,-6)