Need help on how to do this C++ code. Must look similar to the output sample provided. Must also have the SAME Input Validation WITH THE SAME TEXT. The first photo is the code instructions, the 2nd photo shows how the output and INPUT VALIDATION MUST LOOK. I also need help with creating an Algorithm and Header files for this C++ code. My professor told me that the code needs to look ORGANIZE AND NEAT and BE EASY TO READ. He recommends writing notes/comments ( I assumed he's referring to the GREEN TEXT). I MUST HAVE A ALGORITHM AT THE TOP OF THE CODE AND COMMENTS FOR THIS CODE. INPUT VALIDATION MUST HAVE THE SAME TEXT.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Need help on how to do this C++ code. Must look similar to the output sample provided. Must also have the SAME Input Validation WITH THE SAME TEXT. The first photo is the code instructions, the 2nd photo shows how the output and INPUT VALIDATION MUST LOOK. I also need help with creating an Algorithm and Header files for this C++ code. My professor told me that the code needs to look ORGANIZE AND NEAT and BE EASY TO READ. He recommends writing notes/comments ( I assumed he's referring to the GREEN TEXT). I MUST HAVE A ALGORITHM AT THE TOP OF THE CODE AND COMMENTS FOR THIS CODE. INPUT VALIDATION MUST HAVE THE SAME TEXT.

## Output Samples

### Microsoft Visual Studio Debug Console

```
iMobile Bill Calculator ...

Select a subscription package:
1. Package A
2. Package B
3. Package C
Package: 1

How many gigabytes of data were used? 12.5

The total amount due is $124.99
```

*The Text version of the Output samples for the iMobile Service Provided program.*

---

## Input Validation

### Microsoft Visual Studio Debug Console

#### First Example

```
iMobile Bill Calculator ...

Select a subscription package:
1. Package A
2. Package B
3. Package C
Package: 0

Error ... Invalid package. Try again.
```

#### Second Example

```
iMobile Bill Calculator ...

Select a subscription package:
1. Package A
2. Package B
3. Package C
Package: 2

How many gigabytes of data were used? -100

Error ... Invalid gigabytes entered. Try again.
```

These console outputs illustrate the iMobile Bill Calculator and demonstrate both correct operation and error handling due to invalid inputs in subscription package selection and data usage entry.
Transcribed Image Text:## Output Samples ### Microsoft Visual Studio Debug Console ``` iMobile Bill Calculator ... Select a subscription package: 1. Package A 2. Package B 3. Package C Package: 1 How many gigabytes of data were used? 12.5 The total amount due is $124.99 ``` *The Text version of the Output samples for the iMobile Service Provided program.* --- ## Input Validation ### Microsoft Visual Studio Debug Console #### First Example ``` iMobile Bill Calculator ... Select a subscription package: 1. Package A 2. Package B 3. Package C Package: 0 Error ... Invalid package. Try again. ``` #### Second Example ``` iMobile Bill Calculator ... Select a subscription package: 1. Package A 2. Package B 3. Package C Package: 2 How many gigabytes of data were used? -100 Error ... Invalid gigabytes entered. Try again. ``` These console outputs illustrate the iMobile Bill Calculator and demonstrate both correct operation and error handling due to invalid inputs in subscription package selection and data usage entry.
### iMobile Service Provided

#### iMobile.cpp

**iMobile** is a mobile phone service company that offers three different data plans to its customers.

#### Plan A:
- **Price:** $39.99 per month.
- **Data allowance:** Includes 4 gigabytes of data. Additional data costs $10 per gigabyte.

#### Plan B:
- **Price:** $59.99 per month.
- **Data allowance:** Includes 8 gigabytes of data. Additional data costs $5 per gigabyte.

#### Plan C:
- **Price:** $69.99 per month.
- **Data allowance:** Unlimited

---

### Program Instructions

Create a program that calculates a customer’s monthly bill. The program should:
- Prompt the user for the customer’s plan and the number of gigabytes of data used.
- Calculate and display the total amount due.

### Notes

- **Menu Interaction**  
  Use a menu to prompt the user for the plan.

- **Input Validation**
  - Display an error message if the user enters an invalid menu option.
  - Do not allow negative values for data used.

- **Output Format**
  - Display the amount due, formatted with a precision of two decimal places.
Transcribed Image Text:### iMobile Service Provided #### iMobile.cpp **iMobile** is a mobile phone service company that offers three different data plans to its customers. #### Plan A: - **Price:** $39.99 per month. - **Data allowance:** Includes 4 gigabytes of data. Additional data costs $10 per gigabyte. #### Plan B: - **Price:** $59.99 per month. - **Data allowance:** Includes 8 gigabytes of data. Additional data costs $5 per gigabyte. #### Plan C: - **Price:** $69.99 per month. - **Data allowance:** Unlimited --- ### Program Instructions Create a program that calculates a customer’s monthly bill. The program should: - Prompt the user for the customer’s plan and the number of gigabytes of data used. - Calculate and display the total amount due. ### Notes - **Menu Interaction** Use a menu to prompt the user for the plan. - **Input Validation** - Display an error message if the user enters an invalid menu option. - Do not allow negative values for data used. - **Output Format** - Display the amount due, formatted with a precision of two decimal places.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education