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

  Quantity demanded and vice versa

Define what is of the higher the price of a good, the smaller the quantity demanded and vice versa?

  Answer the following multiple choice questions

Answer the following Multiple choice questions.

  Assume a currency swap in which two counterparties

Assume a currency swap in which two counterparties of comparable credit risk each borrow at the best rate available, yet the nominal rate of one counterparty is higher than the other

  Estimate the demand for combo meals

Specify a linear functional form for the demand for Combination 1 meals, and run a regression to estimate the demand for Combo 1 meals.

  Main concepts that we study in macroeconomics

What are the main concepts that we study in macroeconomics.

  Do you think an international policy restricting currency

Do you think an international policy restricting currency trading amongst arbitraguers and speculators will prevent monetary problems in the future?

  Why are the arguments susceptible to abuse

The potentially valid arguments for tariff protection-military self-sufficiency, infant industry protection, and diversification for stability-are also the most easily abused." Why are these arguments susceptible to abuse

  The marketplace in which it operates the role of government

the marketplace in which it operates the role of government regulations of company and any issues or opportunities that the Home Depot faces.

  Why the game has two pure strategy nash equilibria

(b) The game also has a mixed strategy Nash equilibrium. Find the equilibrium probability that each country will act tough as a function of k. (c) Does the equilibrium probability that a country will act tough rise, fall, or remain constant as k ri..

  Illustrate what effect if any will this have on competition

Illustrate what effect if any will this have on competition with Canadian and US firms. Elucidate extent is your answer industry dependent.

  Determination of whether goods are intermediate or final

The following outputs considered an intermediate good, a final good, or neither for purposes of calculating GDP in the current year.

  How many tents will karen rent under new pricing strategy

The company from which Karen is renting decides to try a new pricing strategy whereby the additional cost falls as more tents are rented. The following chart details Karen's total willingness to pay and the total cost of renting tents under the co..

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