Write a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal charge. The tax should be 6.75 percent of the meal cost. The tip should be 15 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount, and total bill on the screen. Use the template, Program1-Template.cpp, to complete this programming assignment. Download the attached file, Program1-template.cpp, from Blackboard and rename it as Program1.cpp. Any line that starts with the characters "//" is a comment in C++ and the compiler ignores it. Remove the angle brackets "<" and ">" in any line that starts with "//" and replace it with the appropriate information.
Write a program that computes the tax and tip on a restaurant bill for a patron with a
$44.50 meal charge. The tax should be 6.75 percent of the meal cost. The tip should be
15 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount,
and total bill on the screen. Use the template, Program1-Template.cpp, to complete this
programming assignment.
Download the attached file, Program1-template.cpp, from Blackboard and rename it as
Program1.cpp. Any line that starts with the characters "//" is a comment in C++ and the
compiler ignores it. Remove the angle brackets "<" and ">" in any line that starts with "//"
and replace it with the appropriate information.
![This is a simple function written in C++ language. The function `developerInfo()` is designed to print out some information about a developer, specific to a particular course and program. Here is the breakdown of the function:
```cpp
//******************************************
void developerInfo()
{
cout << "Name: Reshma Kumar" << endl;
cout << "Course: Programming Fundamentals II" << endl;
cout << "Program: One"
<< endl
<< endl;
}
// End of developer
//******************************************
```
**Explanation:**
1. **Line 61 to 68: Function Definition**
- `void developerInfo()` defines the function named `developerInfo` that does not return any value (indicated by `void`).
- The function body is enclosed within the curly braces `{}`.
2. **Line 63 to 65: Output Statements**
- `cout` is used to output text to the console.
- The `<<` operator is used to send the data to `cout`.
- `"Name: Reshma Kumar"` is a string that gets printed, followed by `<< endl;`, which inserts a newline character.
- Similarly, the next two lines print:
- `"Course: Programming Fundamentals II"`
- `"Program: One"`
- The `endl` at the end of each line ensures that the printed text appears on separate lines.
3. **Line 62, 67, 68: Comment Lines**
- Comments are included to improve code readability. They are ignored by the compiler.
- The comment `//******************************************` is likely used to visually separate sections of the code.
- At the end of the function, the comment `// End of developer` is added to indicate the end of this specific section.
This function, when called, will print the following information in the console:
```
Name: Reshma Kumar
Course: Programming Fundamentals II
Program: One
```
**Use Case:**
This function is helpful in a scenario where information about the developer needs to be displayed, perhaps as part of documentation or program metadata. It's a common practice in educational settings to embed such information within program assignments to ensure proper attribution.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e6fa127-a003-469d-9a51-b1d4610918ed%2F42f045d8-c286-472e-a391-24adaa543837%2Fn3sons8_processed.png&w=3840&q=75)
![```cpp
using namespace std;
void developerInfo();
/**************************************************
// Function: main
// Description: The main function of the program
// Parameters: None
// Returns: Zero (0)
**************************************************/
int main()
{
developerInfo(); // Do not delete this statement
// Write your code here
system("PAUSE");
return 0;
}
/**************************************************
// Function: developerInfo
// Description: The developer's information
// Parameters: None
// Returns: N/A
**************************************************/
void developerInfo()
{
// Developer information to be added here
}
```
### Code Overview:
The provided C++ code is a simple template for a program, including both main and developerInfo functions. Below is a detailed explanation of the code structure:
- **Includes and Namespace:**
```cpp
using namespace std;
```
The code uses the `std` namespace to avoid prefixing standard library names with `std::`.
- **Function Declaration:**
```cpp
void developerInfo();
```
The `developerInfo` function is declared but not yet defined. This function will hold the developer’s information.
- **Main Function:**
```cpp
/**************************************************
// Function: main
// Description: The main function of the program
// Parameters: None
// Returns: Zero (0)
**************************************************/
int main()
{
developerInfo(); // Do not delete this statement
// Write your code here
system("PAUSE");
return 0;
}
```
- **Description and Parameters:** A header comment block describes the `main` function, including its purpose, parameters (none in this case), and return value (zero).
- **Functionality:**
- The `developerInfo` function is called.
- A placeholder comment indicates users to write their code.
- The `system("PAUSE")` command is used to pause the console window.
- **Return Value:** The function returns 0 to indicate successful execution.
- **Developer Information Function:**
```cpp
/**************************************************
// Function: developerInfo
// Description: The developer's information
// Parameters: None
// Returns: N/A
**************************************************/
void developerInfo()
{
// Developer information](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e6fa127-a003-469d-9a51-b1d4610918ed%2F42f045d8-c286-472e-a391-24adaa543837%2Fylyxuv9_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)