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

  Clearly illustrate the short-run and medium-run equilibria

Based on your understanding of the aggregate supply and demand model and the IS-LM model, graphically illustrate and explain what effect an increase in the money supply will have on the economy. In your graphs, clearly illustrate the short-run and..

  Minimizing unemployment rate

Discuss should the government minimize unemployment rate? What will happen if the unemployment rate is too low?

  When does marginal social benefit equal marginal social cost

Discuss perfect competition and long-run equilibrium. Provide detailed descriptions, definitions and concrete examples of your findings. Additionally, how does the proliferation of global trade and competition contribute to markets moving more awa..

  Does each additional singing of song hurt more than prvious

Mylie's total utility from singing the same song over and over is 50 utils after one repetition, 90 utils after two repetitions, 70 utils after three repetitions, 20 utils after four repetitions, 250 utils after five repetitions, and 2200 utils af..

  Determine five key strategies a sales manager

Determine five key strategies a sales manager would need to show a meeting, convention, or exposition organizer during a FAM trip to close the sale.During busy times of the year, a hotel, convention center, or meeting hall may have more demand tha..

  Aggregated supply and aggregate demand mean

What is aggregated supply and aggregate demand mean?

  Risk-based auditing approach in recent years

Explain why there has been an increased use of risk-based auditing approach in recent years and what advantages for the auditors from the adoption of such an approach.

  Role of protocol in sending

Select one of the protocols associated with e-mail, such as SMTP, POP, or IMAP. What is the role of this protocol in sending and/or receiving e-mail? What is an example of how a web application might use this protocol?

  Explain whether the following scenarios shift the aggregate

explain whether the following scenarios shift the aggregate supply or aggregate demand curves. illustrate what happens

  Any goods or services that violate the low of demand

Can you think of any goods or services that violate the low of demand? - Should the sellers of such goods and services be put in jail for violating those lows?

  Explain the causes of recent recession and when

Explain the causes of recent recession and when it started and when it technically ended. Finally why the recent recession was called the worst recession after the great depression.

  Compute the equilibrium of the stackelberg version of game

Now add an entry stage after firm 1 chooses q1. In this stage, firm 2 decides whether or not to enter. If it enters then it must sink cost K2, after which it is allowed to choose q2. Compute the threshold value of K2 above which firm 1 prefers to ..

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