×
Reviews 4.9/5 Order Now

C++ Program to Implement Internet Service Provider Assignment Solution

June 24, 2024
Dr. Olivia Bennett
Dr. Olivia
🇦🇺 Australia
C++
Dr. Olivia Bennett holds a PhD in Computer Science from a prestigious university in the UK. With over 800 completed orders, she specializes in GUI development and database integration in Qt programming. Her expertise lies in crafting intuitive user interfaces and seamlessly integrating database functionalities into Qt applications.
Key Topics
  • Instructions
    • Objective
  • Requirements and Specifications
Tip of the day
Start by clearly understanding the schema and relationships between tables. Use proper SQL syntax, normalize data to avoid redundancy, and always back up before running complex queries. Practice using JOIN, GROUP BY, and subqueries—they're essential for real-world database management tasks.
News
In late June, IntelliJ IDEA 2025.1.3 was released with key bug fixes, including improved AsyncAPI preview, Python interpreter support on ARM/Aarch64 with WSL, and refined test result displays—smoothing the workflow for students using Java, Kotlin, and Python

Instructions

Objective

Write a C++ assignment program to implement internet service provider.

Requirements and Specifications

program-to-implement-internet-service-provider-in-C

Source Code

#include #include using namespace std; int main() { // Ask for letter package string package_name; while(true) { cout << "Enter package: "; cin >> package_name; if(package_name.compare("A") == 0 || package_name.compare("a") == 0 || package_name.compare("B") == 0 || package_name.compare("b") == 0 || package_name.compare("C") == 0 || package_name.compare("c") == 0) { break; } else { cout << "Please enter a valid package name (A, B or C)" << endl; } } // Now, ask for hours int hours; while(true) { cout << "Enter number of hours: "; cin >> hours; if(hours > 0) { break; } else { cout << "Please enter a positive number of hours." << endl; } } // Now, calculate double monthly_cost; double hour_cost; double total_cost; int max_hours; if(package_name.compare("A") == 0 || package_name.compare("a") == 0) { monthly_cost = 9.95; hour_cost = 2.00; max_hours = 10; total_cost = monthly_cost; // Calculate if(hours > max_hours) { total_cost = monthly_cost + (hours - max_hours)*hour_cost; } } else if(package_name.compare("B") == 0 || package_name.compare("b") == 0) { monthly_cost = 13.95; hour_cost = 1.00; max_hours = 20; total_cost = monthly_cost; // Calculate if(hours > 120) { total_cost = monthly_cost + (hours - max_hours)*hour_cost; } } else // it is package C { monthly_cost = 19.95; hour_cost = 0.00; total_cost = monthly_cost; } // Finally, display cout << "Your total bill for this month is: $" << total_cost << endl; }

Similar Samples

"Explore our curated samples at ProgrammingHomeworkHelp.com to witness our expertise in diverse programming assignments. These examples demonstrate our commitment to delivering precise and efficient solutions tailored to your academic or professional requirements. Dive into our samples to experience how we can assist you in mastering programming challenges effectively.