Question
In your economics class, you are studying the purchasing power of money. Over time, the cost of items tends to go up (e.g., inflation), although
In your economics class, you are studying the purchasing power of money. Over time, the cost of items tends to go up (e.g., inflation), although sometimes prices may drop (e.g., deflation).
Use the Web to research price comparisons of items that are commonly purchased. For example, you may want to explore the US Census Bureaus 2012 Statistical Abstract site (http://www.census.gov/compendia/statab/) to locate current and past price indexes on food, fuel, or housing.
Write a program that inputs an items description, a past year, a past price, a current year, and a current price. Make sure your program can handle multi-word descriptions.
The program should then calculate the percent change between the past and current prices and display a report. Your report should have the following characteristics:
All prices must be formatted to display two decimal places.
Percent change must be formatted to display one decimal place.
All report labels must be left aligned, and all report values must be right aligned.
The report must contain a heading that includes the years being compared
Sample output:
Enter description: Potato Chips
Past Year: 2000
Past Year Price: 3.44
Current Year: 2010
Current Year Price: 4.74
Price Comparison: 2000 to 2010
Item: Potato Chips
Past Year: 2000
Past Year Price: 3.44
Current Year: 2010
Current Year Price: 4.74
Percent change: 37.8%
Step by Step Solution
There are 3 Steps involved in it
Step: 1

Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2

Step: 3

Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started