Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Objectives To practice with writing a small C + + main ( ) program, along with compiling and running it To practice with basic C

Objectives
To practice with writing a small C++ main() program, along with compiling and running it
To practice with basic C++ input/output features, along with some simple decimal formatting
To practice with basic arithmetic operators in C++
Task
Create a program (Filename: menu.cpp) that will simulate ordering different goodies from the Trolley as if you are on your way to Hogwarts. You will ask the user how many of certain candy items they'd like, calculate, and print the total for the customer, including wizard tax. (Yes, there's even taxes in the wizarding world).
Declare 4 CONSTANT double variables representing the prices of each item on the menu. The prices should be:
Bertie Botts Every Flavour Beans: $4.00
Chocolate Frog: $1.50
Exploding BonBons: $2.50
Cauldron Cake: $6.25
Use these variables anytime you need to do calculations that involve the prices of these items, or anytime you DISPLAY the prices of these items.
Declare a CONST double variable to represent the Wizard Tax rate of 6.5%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students explore these related Databases questions