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
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?
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?
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.
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
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].
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
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