Ticket price based on the visitor

Assignment Help Basic Computer Science
Reference no: EM131274880

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: EM131274880

Questions Cloud

Describe the process of project management : Discuss what the competencies of project management are within the consulting field. Explain the process of project management and your own personal experience in this area. What are the benefits of setting project objectives?
Examine the federal sentencing guidelines for organizations : A. First, you will examine the Federal Sentencing Guidelines for Organizations (FSGO), the Sarbanes - Oxley Act (SOX), and the Consumer Financial Protection Bureau (CFPB).
Differences between a limited and a general partnership : Identify the primary differences between a limited partnership and a general partnership.- Identify the factors that an entrepreneur should consider when selecting an organizational form for a business.
What would be your ideal internship : Explain how you currently use social media and what you think about the benefits and risks mentioned in the readings. Why do you think you have that perspective?
Ticket price based on the visitor : 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.
Identify top two leadership points you would want to share : Explain how the strengths you have chosen for your partner would complement your strengths. Identify the top two leadership points you would want to share at the workshop, and discuss why you selected those points.
Does beck owe the sylvesters the money : When the Sylvesters learned that Beck had realized a huge profit in a quick resale of the property, they sued Beck, claiming that he owed them the $9,000 profit. Does Beck owe the Sylvesters the money?
How could the planning process be improved where you work : Why is there so much poor planning and organizing in organizations? How could the planning process be improved where you work? Has anyone considered using flow process charts?
Need for data warehousing : Support the need for data warehousing within your company and elaborate on the best practices that the company will adhere to.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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