Computer program that computes the ticket price

Assignment Help Macroeconomics
Reference no: EM131271580

A local art gallery has tasked you with writing a computer program that computes the ticket price based on the visitor's age. Because of the high value of the art exhibits, only visitors 12 years and older are allowed in the art gallery. This means that only ages 12 and higher are valid for this program. The program should ask the visitor to re-enter his or her age if the age entered is less than 12. Use a loop structure to allow the visitor to re-enter his or her age if an invalid age was entered.

The program should use if-statements, that computes the ticket price according to this schedule, given the visitor's age:

  • Ages 12-17 5.00 dollars
  • Ages 18-55 25.00
  • Ages 56 and older 10.00 dollars

The program should output a message that says "Thank you for vising our art gallery. Your ticket price is " followed by the dollar amount of the ticket price. Example output for a visitor that is 55:

Thank you visiting our art gallery. Your ticket price is 25.00

First, describe your algorithm using pseudocode.

Translate the pseudocode into a C++ program. You must comment your program including comments at the top of the file that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Reference no: EM131271580

Questions Cloud

Discuss the implications of results in practical application : Sketch a family of stresss train curves corresponding to three different strain rates: very slow, moderate, and very fast. For each case determine E(0). Discuss the implications of results in practical applications.
Is the compressive strength going to increase : Is the compressive strength going to increase? What about the elastic modulus? Please justify your answer.
Championed sustainable supply chain practices : Find an organization that has championed sustainable supply chain practices. Highlight the sustainability achievements of the organization you’ve chosen and provide a convincing argument at to why your organization is a sustainability “Champion.”
Develop a comprehensive analysis using npv : In this assignment, use the information above to develop a comprehensive analysis using NPV, Payback Method, and IRR to develop a recommendation on replacing the existing equipment with a new computerized version
Computer program that computes the ticket price : A local art gallery has tasked you with writing a computer program that computes the ticket price based on the visitor's age. Because of the high value of the art exhibits, only visitors 12 years and older are allowed in the art gallery.
Analyzing projects by determining longest sequence of tasks : CPM, a technique for analyzing projects by determining the longest sequence of tasks (or the sequence of task with the least slack) through a project network Organizations today are also increasingly using virtual project management teams. They are p..
Count the number of words in the sentence : Your method should count the number of words in the sentence that meet or exceedminLength (in letters). For example, if the minimum length given is 4, your program should only count words that are at least 4 letters long.
What are the pros and cons of this law : The Lilly Ledbetter Fair Pay Restoration Act of 2009 changes the statute of limitations for a claim under Title VII and the EPA for an unjustified pay difference between male and female. The Act resets the statute every time a person received an uneq..
What key competencies have you already realized in journey : What key competencies and accomplishments have you already realized in the journey of your life and work? What other interests and talents do you have that you are passionate about but you have not fully developed?

Reviews

Write a Review

Macroeconomics Questions & Answers

  How is marriage like a decision to build a new factory

how is marriage like a decision to build a new factory? which decision is easier to reverse?do workers choose to work

  Analyzing is lm curves

Carefully describe and show graphically how each of following changes would effect the shape of the IS curve:

  Multiple choice questions based on competitive market

A perfectly competitive market company realizes an average of $11 and an average total cost of $10.00. Marginal cost curve crosses marginal revenue curve at an output level of 100 units.

  In which year did a newly hired professor earn more in real

Which professor is better off. The starting  salary  for a new assistant economics professor was 15000 in 1976 and 80 000in 2005. The value of the CPI for 2005 was 195.3 compared to 56.9 in 1976. In which year did a newly hired professor earn more in..

  Define different price-elasticities of demand

For each market (a. & b.) would it be to the producer's advantage (i.e. would TR increase) to raise or lower price? If P0 = $10.00 and Q0 = 100 units, justify your answers by applying the interpretations of those price-elasticities of demand on t..

  Estimating the demand for money and plotting a demand curve

estimating the demand for money and plotting a demand curve for that estimation based on the equation

  Recommend the information on daily sales report

How would you recommend the information on daily sales report, daily call reports, productivity report, pipeline, and sales forecast to be presented to management?

  Production function of a perfectly competitive firm

Given the Production Function of a perfectly competitive firm, Q = 160L + 18L2 - L3, where Q = Output and L = labor input a. At what value of L will Diminishing Returns take effect? b. Calculate the range of values for labor over which stages I, II, ..

  Compare and contrast the different stages of the business

Compare and contrast the different stages of the business cycle and how inflation and unemployment vary via these different stages. Then discuss the appropriate fiscal and monetary policies to address inflation and unemployment.

  When inflation occurs some economic agents gain and loss

When inflation occurs some economic agents gain and some lose. Who would gain and lose if deflation occurs Why What will happen to interest rates and investment according to Keynesian and Classical/ Monetarist theories

  Write down a paper which provides an economic profile

Write down a paper which provides an economic profile of the automotive manufacturing industry.

  What happen causing both the demand and supply curves

What happen causing both the demand and supply curves to shift. Find the new equilibrium price and quantity after both shifts

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd