6. A microwave oven manufacturer recommends that when heating two items, add 50% to the heating time, and when heating three items double the heating time. Heating more than three items at once is not recommended. Write a program that asks the user for the number of items and the single-item heating time in seconds. The program then writes out the recommended heating time.
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: "Since you have not mention any programming language, so we will write this program in C++…
Q: Your completed program should: 1. Prompt the user and read in the number of a team playing the…
A: Your completed program should: 1. Prompt the user and read in the number of a team playing the…
Q: 2. Write a simple payroll program that will display employee's information. The program should…
A: pay roll program that will display employee's information
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: TASK 3: Write a program that accepts the input code from the user and print according to the input…
A: in c: #include <stdio.h>int main(){ int n1; printf("enter the number: ");…
Q: Write a program that reads the amount of a monthly mortgage payment andthe amount still owed—the…
A: Given: Write a program that reads the amount of a monthly mortgage payment and the amount still…
Q: 3. Write a program that plays a guessing game with the user. The program should generate a random…
A: According to the information given:- We have to follow the instruction in order to create guess game…
Q: Write a program that displays the differences between the first and last, the second and next to…
A: Program description: n is the user input integer variable that stores the number of elements in the…
Q: The power of the microwave can be calculated as follows: Power=Work/Time Work is measured in joules…
A: code: #include<iostream> using namespace std; //main method int main() { //variable…
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: Step 1: Prompt and accept property value from the user. Step 2: Prompt and accept tax rate per $100…
Q: Write a program that calculates and displays a person’s body mass index (BMI). A person’s BMI is…
A: According to the Question below the Solution: Program Output:
Q: Write a program that prompts the user to enter the number of students and each student’s name and…
A: Since the coding language is not given, I have done the code in Python. Algorithm : Step 1 : ask for…
Q: Write a simple payroll program that will display employee's information. The program should perform…
A: Given The answer is given below
Q: 1. Write a program that does the following: Ask the user to enter the price of their items. The user…
A: Actually, program is a executable software that runs on a computer.
Q: An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours that…
A: Program Explanation: 1) Here are input and output methods that are to be used. 2) Use the access…
Q: 7. Write a program that asks the user's name, and then greets the user by name. Before outputting…
A: The problem is based on writing the code to input users' name and to greet the user after converting…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a program to calculate the payment to be paid by user each year and satisfying the…
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a Java program that reads from the user the registration fees and other requirements…
Q: program so that the user enters the rate of tuition increase for the first year. the rate then…
A: C++ used to answer this question
Q: Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we…
A: Given, d=0.5×g×t2 g=9.8 meters/second2 Program description: t is the user input integer variable…
Q: Q2a) A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk…
A: 2a) The code is given below: #include <iostream>#include <iomanip> using namespace…
Q: A customer in a store is purchasing five items. Write a program that asks for the price of each…
A:
Q: Question 1 Write a program that asks the user to enter the number of passengers in an airplane and…
A: "Since you have not mention any programming language, so will write our program in C language." C…
Q: Task: Write the full program that has the following main function. Your program should ask the user…
A: Given: Program to find area or perimeter of the rectangle.
Q: 9) Write a program that takes in the user's name and age. Then displays his/her name's initial…
A: #include<iostream> using namespace std; int main() // main function { string name,…
Q: Write a program that displays a given integer with the corresponding comma in place. Before, commas…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: b- Write a program that allows the user to enter coordinates of circle center and radius then asks…
A: Given: Write a program that allows the user to enter coordinates of circle center and radius then…
Q: 4. Write a program that computes the employee's payroll of ABC Company. The user is first asked to…
A:
Q: Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours…
A: workingHours=float(input("Enter number of working hours: ")); #input working…
Q: 2. Write a program that determines a student's grade. The program will read three scores and…
A: Below is the required C++ program: - Approach: - Import the header file and include the namespace.…
Q: Make a flowchart where a program dispenses cash at an ATM machine that has been upgraded to dispense…
A: Since you needed the output screenshot I am attaching for both conditions thatis when amount is…
Q: Write a program that computes the fuel efficiency of a multi-leg journey. The program will first…
A: Python code :- def question9(): print("Question 9) # arrays to store miles and gas used…
Q: Write a program that computes the body mass index (BMI) of an individual. Your program should begin…
A: Note : Here I have asked for the height in inches and weight in pounds from user. Algorithm : Step…
Q: Q5/ 1. 1. Write a program to read three marks and calculate the average. If the student's average is…
A: Since no programming language is mentioned, I am using python. As per our guidelines, we are…
Q: Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car…
A: Program Plan: importing the libraries of utility class for scanner and other mathematical…
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Program in java for calculation of monthly and total payments for each interest rate. import…
Q: Write a program that calculate electricity bill. The program prompts the user to enter the amount of…
A: C program #include <stdio.h>int main(){ int un; float amt; /* Input units consumed…
Q: Write a simple payroll program that will display the employee's information, The program should…
A: Question given: Write a Java program that display employee's payroll information. Ask from user…
Q: Write a program that prompts the user to enter the name, the number of children, and the basic…
A: Since programming language not mentioned using Python CODE: # cook your dish herename=input("Enter…
Q: The New Telephone Company has the following rate structure for long-distance calls: The regular…
A: Solution:
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: • Write a program that computes the average of 5 students grades which are entered by the user.…
A: Please find the answer below :
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: 1- Write a program in which the user is asked to enter his age based on the year (assuming the…
A: Take input from user. check if the number is positive integer or no. and if the number is positive…
Q: 7) Write a program that asks the user the number of hours an employee worked and his hourly wage,…
A: code:-- #include <iostream>using namespace std; int main(){ // to store the total_hour and…
Q: 2. Write a program that computes the cost of painting and installing carpet in a room. Assume that…
A: Actually, program is a executable software that runs on a computer.
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: Given The answer is given below.
Q: 6) Write a program that prompts the user to input a number. The program should then output the…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program that prompts the user to enter the number of students and each student’s score, and…
A: Given:- Write a program that prompts the user to enter the number of students and each student’s…
Can you please type and execute all these java
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and prints the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format Sample output Enter the hours parked for 3 cars: 1.5 4.0 24.0 Car Hours Charge 1 1.5 2.00 2 4.0 2.50 3 24.0 10.00 TOTAL 29.5 14.50A parking garage charges a $2.00 minimum fee to park for up to three hours andan additional $0.50 per hour for each hour or part thereof over three hours. Themaximum charge for any given 24-hour period is $10.00. Assume that no car parksfor longer than 24 hours at a time. Write a program that will calculate and print theparking charges for each of three customers who parked their cars in this garageyesterday. You should enter the hours parked for each customer. Your programshould print the results in the below format, and should calculate and print thetotal of yesterday's receipts. The program should use the functioncalculateCharges to determine the charge for each customer.Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönder
- The local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. B 6. A 11. B 16. C 2. D 7. B 12. C 17. C 3. A 8. A 13. D 18. B 4. A 9. C 14. A 19. D 5. C 10. D 15. D 20. A A student must correctly answer 15 of the 20 questions to pass the exam. Write a class named DriverExam that holds the correct answers to the exam in an array field. The class should also have an array field that holds the student’s answers. The class should have the following methods: • passed. Returns true if the student passed the exam, or false if the student failed. • totalCorrect. Returns the total number of correctly answered questions. • totalIncorrect. Returns the total number of incorrectly answered questions. • questionsMissed. An int array containing the question numbers of the questions that the student missed. Demonstrate the class in a complete…Body Mass Index (BMI) is a measure ofhealth on weight. It can be calculated by taking your weight in kilograms anddividing, by the square of your height in meters. Write a program that prompts theuser to enter a weight in pounds and height in inches and displays the BMI. Noteone pound is 0.45359237 kilograms and one inch is 0.0254 meters. Here is asample run: Enter weight in pounds: 95.5 ↵EnterEnter height in inches: 50 ↵EnterBMI is 26.8573An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges. Requirements: Please include a Flowchart and the pseudocode for your program and use Visual Basic
- An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges. Using Visual Basic I need help finishing this code this is what I got so far Dim decpackageA As DecimalDim decpackageA1 As DecimalDim decpackageB As DecimalDim decpackageB1 As DecimalDim decpackageC As DecimalDim inthours_worked As IntegerDim dectotal_chargespackageA As DecimalDim dectotal_chargespackageB As DecimalDim dectotal_chargespackageC As DecimalDim dbltotal_charges As Double 'Assign the textbox…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. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of minutes that were used. The program should display the total charges.Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.
- Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: • The number of days spent in the hospital • The daily rate Hospital medication charges • Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an outpatient: • Charges for hospital services (lab tests, etc.) • Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file, PatientReport.txt. You can use the techniques you learned in Chapter…Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the total chargesWrite a program that asks the user to enter a number of seconds.• There are 86400 seconds in a day. If the number of seconds entered by the useris greater than or equal to 86400, the program should display the number ofdays in that many seconds.• There are 3600 seconds in an hour. If the number of seconds entered by theuser is less than 86400 but is greater than or equal to 3600, the programshould display the number of hours in that many seconds.• There are 60 seconds in a minute. If the number of seconds entered by the useris less than 3600 but is greater than or equal to 60, the program should displaythe number of minutes in that many seconds.