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

  Which type of script control structure is useful

Which type of script control structure is useful when a specific action needs to be done a set number of times? a. for b. until c. if, then, else d. while

  Describe both remote-access vpns and point-to-point vpns

Use the library, Internet, or any other sources available to you to research VPNs and network address translation (NAT). Complete the following for your individual project: Describe both remote-access VPNs and point-to-point VPNs.

  Explaining vulnerability in novice programmer-s code

You have found vulnerability in novice programmer's code and have recommended sweeping changes in your organization to address issues.

  Explain data processing stages

Explain Data Processing Stages /cycle. Students are required to Use diagrams and provide clear exaplnnation to earn maximum points?

  Convert the following string to uppercase

-Write two assembly language programs one using regular instructions (not string instructions) and one using string instructions. The program should copy the string in problem-1 to another location and then compare the original and copied string t..

  Store the values into a hash table with 10 buckets

Store the values into a hash table with 10 buckets, each containing three slots. If a bucket is full, use the next (sequential) bucket that contains a free slot.

  Describe how variables in perl are handled

Generate a menu to ask the user for the task that he or she would like to see performed.

  Research methods for information technology

Research methods for information technology involved in Mobile platforms and social media

  Prepare a data disk and backup disk for the problem solving

Prepare a data disk and a backup disk for the problem-solving exercises and other computer-based assignments.

  Optimal substructure of matrix-chain multiplication

Matrices so as to maximize, rather than minimize, number of scalar multiplications. Does this problem show  optimal substructure?

  The disregard for ethics in an organization.

There have been a number of headline examples recently that have discussed the disregard for ethics in an organization.

  Compute and analyze the financial data

Compute and analyze the financial data using a Microsoft® Excel® spreadsheet. Make sure all calculations can be seen in the background of the applicable spreadsheet cells. In other words, leave an audit trail so others can see how you arrived at y..

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