def main():while(True):allowed = int(input("How many minutes are allowed: "))while(not minAllowed(allowed)):print("Please enter minutes between 100 and 700")allowed = int(input("How many minutes are allowed: "))used = int(input("How many minutes were used: "))while(not minUsed(used)):print("Please enter minutes used of at least 0")used = int(input("How many minutes were used: "))over = totalOver(allowed,used)if(over > 0):print("You were over your minutes by " + str(over))else:over = 0print("You were not over your minutes for the month")printReport(allowed,used,over)toEnd = input("Do you want to end program? (Enter no or yes): ")toEnd = toEnd.rstrip('\r')while((toEnd != "yes") and (toEnd != "no")):print("Please enter a yes or no")toEnd = input("Do you want to end program? (Enter no or yes): ")if(toEnd == "yes"):breakdef printReport(allowed,used,over):print("---------------MONTHLY USE REPORT------------------")print("Minutes allowed were " + str(allowed))print("Minutes used were " + str(used))print("Minutes over were " + str(over))print("Total due is $ " + str(totalDue(over)))def minAllowed(min):if(min >= 100) and (min <= 700):return Trueelse:return Falsedef minUsed(min):if(min >= 0):return Trueelse:return Falsedef totalOver(allowed,used):return (used - allowed)def totalDue(over):return (64.95 + (0.15*over))Java Programming Problem description with its major requirements labeled from A to I. A mobile phone service provider has three different subscription packages for its customers: Package A: For $39.99 per month 450 minutes are provided. Additional minutes are $0.45 per minute. Package B: For $59.99 per month 900 minutes are provided. Additional minutes are $0.40 per minute. Package C: For $69.99 per month unlimited minutes are provided. Design a class MobileCharges that calculates a customer’s monthly bill. It should...
PLEASE DO THIS IN JAVA!Design (pseudocode) and implement (source code) a program (name it PhoneBill) that calculates the bill for a cellular telephone company. The company offers two types of service: regular service and premium service. The rates vary depending on the type of service. The rates are computed as follows: Regular service: $15.00 fee covering first 50 minutes. Charges for over 50 minutes are computed at the rate of $0.50 per minute. Premium service: $25.00 fee plus: a. For...
IN JAVA PLEASE Design (pseudocode) and implement (source code) a program (name it PhoneBill) that calculates the bill for a cellular telephone company. The company offers two types of service: regular service and premium service. The rates vary depending on the type of service. The rates are computed as follows: Regular service: $15.00 fee covering first 50 minutes. Charges for over 50 minutes are computed at the rate of $0.50 per minute. Premium service: $25.00 fee plus: a. For daytime...
Write a program **(IN C)** that displays all the phone numbers in a file that match the area code that the user is searching for. The program prompts the user to enter the phone number and the name of a file. The program writes the matching phone numbers to the output file. For example, Enter the file name: phone_numbers.txt Enter the area code: 813 Output: encoded words are written to file: 813_phone_numbers.txt The program reads the content of the file...
Design an algorithm for each of the exercises and type it into a word document. Upload the document to PE1 assignment folder. 1) Decision-based Algorithm: A cell phone company offers a plan with 750 minutes of voice communications at a rate of $40.00/month. Any minutes over 750 are charged at a rate of 0.50 per minute. Write an algorithm that allows the user to input the number of minutes a phone customer used during a particular month. The algorithm should...
write in C++ Problem 1: Mobile Service Provider A cell phone service provider has three different subscription packages for its customers. Package A: For $39.99 per month 450 minutes are provided. Additional minutes are $0.45 per minute. Package B: For $59.99 per month 900 minutes are provided. Additional minutes are $0.40 per minute. Package C: For $69.99 per month unlimited minutes provided. Write a program that calculates a customer’s monthly bill. It should ask which package the customer has purchased...
Exercise 4 – Chapter 7 Speeding violation CalculatorPython code for the followingDesign a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speedlimit and the driver’s speed. Validate the input as follows:• The speed limit should be at least 20, but not greater than 70.• The driver’s speed should be at least the value entered for the speed limit (otherwise the driver...
Q2.1) Write a program to calculate phone bill of the user. The rule to calculate bill is given as follows: • You should ask the option to the user at first. If the phone bill will be calculated with internet connection option, user must enter 1, otherwise user must enter O. Do all necessary controls and take the number from the user until the user enters one of the correct options. (1 or 0). • Design 2 different methods. Both...
A friend of yours is considering two cell phone service providers. Provider A charges $100 per month for the service regardless of the number of phone calls made. Provider B does not have a fixed service fee but instead charges $1 per minute for calls. Your friend's monthly demand for minutes of calling is given by the equation QD=120−30P QD=120−30P, where P is the price of a minute. 1. With Provider A, the cost of an extra minute is ?...