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

  Design a program using java code to process round trip

Design a program using JAVA code to process round trip tickets for travel to 2 cities and determine the bill for the travel tickets. The return trip must be at least 7 days from the initial trip to qualify for a discount of 20%, otherwise trave..

  Which is the best policy while driving

What kind of agent design is necessary to carry out the policy (reflex, model-based, goal-based, or utility-based)?

  Preparing for a company-wide migration to windows 8

Crescent Manufacturing Inc. (CMI) is a luxury leader in crafted and customized home furnishings. The corporate headquarters and a production facility are located in Texas, with additional manufacturing facilities located in Nebraska and Maryland.

  Linux is which kind of operating system

Linux is which kind of Operating System?

  Problem regarding the communication and collaboration

1) How do you think communication and collaboration would evolve? 2) How do you think these communication technologies will affect the travel industry which depends heavily on business-related travel?

  Assess the key practices and improvement actions from the

q1. evaluate the key practices and improvement activities from the people capability maturity model and recommend the

  Estimate the average percentage of the total time

Consider a long sequence of accesses to a disk with 8 ms average seek time, 3 ms average rotational delay, and a data transfer rate of 60 Mbytes/sec. The average size of a block being accessed is 64 Kbytes. Assume that each data block is stored in..

  Define a class to represent time

Define a class to represent time, in military format. Your class should have three private data members.

  How much ram is installed on your computer?

How much RAM is installed on your computer?

  Freedom of expression in cyberspace-information society

Write down a 3 pages summary about "Freedom of expression in Cyberspace & Information Society " after reading at least one article in each point of view.

  When would a weak relationship be more suitable

When would a weak relationship be more suitable than a strong relationship? Give concrete examples?

  Working with windows core server

In this unit we are working with Windows Core Server which has a very limited graphical interface. This is one reason why it's necessary to develop your command line skills. Why else is it a good idea to have a strong background in command line 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