Question

In: Computer Science

This solution is to be written in JAVA It is difficult to make a budget that...

This solution is to be written in JAVA

It is difficult to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year, you cannot simply use this year’s price as the cost of pencils two years from now. Because of inflation, the cost is likely to be higher than it is today.

The program asks for the cost of the item, the number of years from now that the item will be purchased, and the rate of inflation. The program then outputs the estimated cost of the item after the specified period. Have the user enter the inflation rate as a percentage, such as 5.6 (percent). Your program should then convert the percent to a fraction, such as 0.056, and should use a loop to estimate the price adjusted for inflation.

Solutions

Expert Solution

The below is java code to calculate the cost price after certain year entered by user and at cartain inflation rate entered in fractional value :

TEST CASE #1

Please Enter the cost : 3000
Please enter the number of Years also : 8
Please enter the inflation rate also : 0.056

OUTPUT
The cost of Items is USD 3013.46 in 8 years.

TEST CASE #2

Please Enter the cost : 4000
Please enter the number of Years also : 12
Please enter the inflation rate also : 0.007

OUTPUT
The cost of Items is USD 4003.36 in 12 years.


Related Solutions

It is difficult to make a budget that spans several years, because prices are not stable....
It is difficult to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year, you cannot simply use this year’s price as the cost of pencils two years from now. Because of inflation, the cost is likely to be higher than it is today. Write a program to gauge the expected cost of an item in a specified number of years. The program asks for the cost of the item,...
5. How difficult do you think it would be to make a 10 M sugar solution?...
5. How difficult do you think it would be to make a 10 M sugar solution? Justify your answer.
The solution should be written in Java. Your POSmain program should take three file names from...
The solution should be written in Java. Your POSmain program should take three file names from command line arguments. The first file contains a list of products and their prices; the second and third files are lists of items in two shopping carts of two customers. The POSmain program should first read the price file, then read each of the cart files to load a list of items in a shopping cart and store them in a ShoppingCart objects. The...
Written in JAVA Coding Write a java project that reads a sequence of up to 25...
Written in JAVA Coding Write a java project that reads a sequence of up to 25 pairs of names and postal (ZIP) codes for individuals (sample input data is attached). Store the data in an object designed to store a first name (string), last name (string), and postal code (integer). Assume each line of input will contain two strings followed by an integer value, each separated by a tab character. Then, after the input has been read in, print the...
Please type responses as it is difficult for me to see written responses. Thank you 1)...
Please type responses as it is difficult for me to see written responses. Thank you 1) How does understanding the correlation between variables help us understand regression? 2) Provide two ways on how you might use regression while teaching a classroom of children. 3) What is one easy way to remember the differences between parametric and nonparametric tests? (Note: I'm not asking you to list the differences but HOW you can remember the differences. Feel free to be creative here...
Why do you believe fiscal policy is so difficult to make? Is it better to make...
Why do you believe fiscal policy is so difficult to make? Is it better to make policies or simply let the economy handle problems? How will you decide this issue?
This program is written in Java and should be modularized in methods in one class. This...
This program is written in Java and should be modularized in methods in one class. This program will calculate the Gross Earnings, FICA tax (Medicare and Social Security taxes), Federal Tax Withheld, and Net Amount of the payroll check for each employee of a company. The output must contain numbers with 2 decimal places. The user input must be validated – if incorrect data is entered, send an error message to the user. INPUT The application must be able to...
Macroeconomic policy is about making difficult decisions involving tradeoffs.Examples of these tradeoffs.Interpret it.(350 words) No written...
Macroeconomic policy is about making difficult decisions involving tradeoffs.Examples of these tradeoffs.Interpret it.(350 words) No written responses please, only typed.
Refer to the four traps in the reading/discussion that the make it difficult for the "bottom...
Refer to the four traps in the reading/discussion that the make it difficult for the "bottom billion" to get out of impoverishment. Choose one (1) trap and research on a country which contains the “Bottom Billion” that experienced/is experiencing that 'trap'. Discuss in 15-25 sentences. Cite your references. Guide Questions: -How did it affect their country? (economy, welfare of the people, relations with other countries, etc.) -What were their attempts to address it? -Did they overcome at least some of...
What is the characteristics of anthrax spores that make disinfection more difficult?
What is the characteristics of anthrax spores that make disinfection more difficult?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT