Translate the following steps into a Java program 1. Get the monthly_fees 2. Get the minutes 3. Get the rate 4. If minutes is less than or equal to 1000 then a. bill = monthly_fees %3D 5. Otherwise if minutes is between 1000 and 2000 (not including 1000) a. bill = (minutes - 1000)*rate + monthly_fees %3D 6. Otherwise a. bill = (minutes - 1000)*rate * 1.5 + monthly_fees 7. Display "The bill is" + bill 8. Display "Thank you for using our program"
Q: Code the following statments in JAVA If your average time to run each mile is under 11 minutes,…
A: Step-1: StartStep-2: Declare variable avgTime and take input from userStep-3: if avgTime is greater…
Q: Write a Java program that calculates and prints the monthly pay for an employee. The net pay is…
A: Actually, program is an executable software that runs on a computer.
Q: A hypermarket is giving discount on products purchased based on the total bill amount (in +Omani…
A:
Q: Java Program. Create a java program that will compute the basic salary of the employee, the…
A: public class Solution { public static void main(String[] args) { int daily_rate = 80;//given daily…
Q: You can measure time duration in Java by utilizing Instant and Duration objects, as shown in the…
A: / /importsimport java.time.Duration;import java.time.Instant; //driver classpublic class…
Q: At a certain university, students have to submit their exams online.
A: Source code: Program: //Header filesimport java.util.Scanner; //Classpublic class Main{…
Q: Write a program java that reads a number of feet from the user, then prints out either the same…
A: Start Input feet If the feet is less than 1 print Number out of range endif else if feet < 5280…
Q: Write a java program to calculate the Gross, Tax, Net for 10 employees. Assuming: The input is…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) {…
Q: If you want to build a system for calculating gasoline consumption in cars, use the Java language to…
A: GasMileage.java public class GasMileage{ double totalMiles, totalGallons; public double…
Q: Create a Java program that will read a date (month, day and year) in integer form and display the…
A: Simple Date Format is a concrete class for formatting and parsing dates in a locale-sensitive…
Q: 1. Write a complete JAVA program that display 5 types of fruit with their price. The fruits and…
A: import java.util.*; class ItemClass { String name; double price; int quantity;…
Q: Write a java program that asks for the name, hours worked, and hourly rate of an employee. The…
A: program code: import java.util.*;import java.util.Scanner;class Main{ public static void main…
Q: Write a program that asks the user to enter a month (1 for January, 2 for February, etc.) and then…
A: Program plan: This software asks the user to enter any number from 1 to12, with 1= January, 2=…
Q: Required is a Java program that receives the names of 250 students via a keyboard, and their…
A: import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import…
Q: Write a Java program that displays employees information and their salary. There are two types of…
A: Salary of Part-time employee is calculated as: If working hours are less than or equal to 40 then…
Q: You are asked to write a java program for an embassy to help with the visa process. Your program…
A: To solve the given question first you need to take input in the given format then you have to…
Q: Write a Java Program Code for this,Please. The East Coast sales division of a company generates…
A: The java code along with the snapshot of code and output is given below.
Q: Write a complete Java program, including comments, to do the following: Your program will compute…
A: The complete code given below with output .
Q: JAVA PROGRAM A bank offers a 3% interest per annum for savings accounts. The bank also has 1%…
A: A bank account is a ledger that is gainful for salaried people or those with a customary month to…
Q: Ask the user for a number of seconds. Display the number of minutes, seconds, and hours accordingly.…
A: Here, Code instruction is given.
Q: Write a java program that ask user to enter the grade depending on the below grading system : a.…
A: In the solution of the given problem to find the grade of a student if-else ladder statement is…
Q: Create a Java program that will ask the user to input time-in and time-out from January 1 to 15,…
A: Objective: This program determines the difference between two given times (in-out) and also displays…
Q: Write a program that reads an unspecified number of scores and determines how many scores are above…
A: import java.util.Scanner;//to read inputpublic class Main{ public static void main(String[] args) {…
Q: Write the java program for the following problem. The program will accept the values of the radius…
A: Given: To write a java program to calculate volume of code and cylinder for given following…
Q: Write a complete Java program that will calculate and display your BMI based on your weight and…
A: BMI = weight / height2
Q: According to researchers at Stanford Medical School, the ideal weight for a woman is found by…
A: Note: - As per our guidelines we can only answer first question at a time. Please resubmit the other…
Q: Write a complete Java program that prompts the student to enter the credit hours earned and then…
A: PROGRAM CODE: import java.util.*; // import java utility packagepublic class…
Q: Write a program that calculates how much money you’ll end up with if you invest an amount of money…
A: Let p in initial amount, n be number of years and r be interest rate then compound interest is…
Q: Write a Java program that prompts the user to enter two positive integers and find their greatest…
A: Java code: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: WRITE A JAVA PROGRAM. Telco is a cellular telephone company that offers two types of service:…
A: Formulas to calculate the standard and premium charges calculations: Fixed rates for standard and…
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: given data
Q: Write a Java program that computes the number of candy bars and gumballs you can get by redeeming…
A: Please find the answer below :
Q: For an invoice calculation program, write the JAVa program that calculates the amount of VAT and the…
A: It is defined as a powerful general-purpose programming language. It is used to develop desktop and…
Q: Create a JAVA program Write a program that reads total marks of 5 students and give their grades…
A: Required: Create a JAVA program Write a program that reads total marks of 5 students and give their…
Q: *** Complete in Java Program** Use Gambler's Ruin Example Gambler's ruin. Suppose a gambler makes…
A: First you need to know that what is gambler's Ruin problem : Card shark's Ruin ProblemConsider a…
Q: Write a program that simulates a traffic light. The program lets the user select one of three…
A: Answer : Program code : //TrafficLightSimulate.java//import the required packagesimport…
Q: Write, Compile and Execute a Java program that reads an investment amount, annual interest rate and…
A:
Q: Write a java program that determines a student’s grade. The program will accept 3 scores and…
A: The above program is answered bellow
Q: Write a Java program for a Play-House Manager, who would like to calculate the total profit from…
A: The JAVA code is given below with code and output screenshot
Q: The problem states that there are five philosophers sitting around a circular table. The…
A: Problem statement: The problem states that there are five philosophers sitting around a circular…
Q: 5. Write a Java program that reads a number in inches then converts it to meters. Note that One inch…
A: Program outline: Ask user to input a number in inches. Use Scanner class of java to take user…
Q: Output a half pyramid of stars with a height determined by the user. If the user enters a number…
A: Given: Output a half pyramid of stars with a height determined by the user. If the user enters a…
Q: Given a set of cities, the central city is the city that has the shortest total distance to all…
A: GIVEN:
Q: Write a program java that reads a number of feet from the user, then prints out either the same…
A: Output Screenshot:
Q: a player receives a free jump man at 7000 points. Prompt the user for their score. If the score is…
A: Given Data: When the score is 7000 or more 1UP or less than 0 invalids or we print the how many more…
Q: Write a java program. Drinks such as Coffee, Tea, Cola and energy drinks contain caffeine level.…
A: Algorithm: Start Read no.of green tea cups consumed Calculate result=28*no.of green tea cups…
Q: How do I solve this problem in java programming language? After all loan information is input,…
A: The output has no now line as there is no line break. The information has been printed in one line.…
Q: Create a java program 8. Speedy, Still Not, Gonzales Recall that the general speed limits in the…
A: Given, General speed limits in the Philippines is 60 km/h on highways Speed limit is 100 km/h on…
Q: Write a program java that reads a number of feet from the user, then prints out either the same…
A: Explanation Scanner class is used for input long miles = totalFeet/5280; long foot =…
Q: Write a Java program to take orders for a mobile shop and print a bill, Your program asks for the…
A: Required: Write a Java program to take orders for a mobile shop and print a bill, Your program asks…
Step by step
Solved in 2 steps with 1 images
- A supermarket awards coupons depending on how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth eight percent of the amount. The following table shows the percent used to calculate the coupon awarded for different amounts spent. Write a JAVA program that calculates and prints the value of the coupons a person can receive based on groceries purchased. Money Spent Coupon Percentage Less than 10$ No coupon $10-$59 8% $60-$149 10% $150-$209 12% $210 or more 14% Here is a sample run: Please enter the cost of your groceries: 14 You win a discount coupon of $1.12. (8% of your purchase)JAVA PROGRAMA bank offers a 3% interest per annum for savings accounts. The bank also has 1% withholding tax per annum. Assuming that there are no withdrawals on the account, write an application that will calculate the estimated total earnings of a bank customer for a given number of years. Make your program ask for the principal amount and the number of years. Output the estimated total earnings.IN JAVA The two forces acting on an aircraft in flight are lift (acting upwards) and weight (acting downwards). If the lift of the aircraft equals the weight of the aircraft, then the aircraft neither goes up nor down, it is in level flight. If the lift is greater than the weight, then the aircraft climbs (gains altitude). If the weight is greater than the lift, then the aircraft descends (loses altitude)Write a Java program named Flying that calculates whether an aircraft is flying level, climbing or descending.The basic equation to calculate this lift is known as the Flight Equation.
- A Software Engineering Company has a salary system based on position level. The table below represents the salary paid according to each position: Employee Position Employees Salary Employees' Name: Ali Position: Bonus Amount: Final Cost: $3500 Manager Supervisors Sales Person The Company decided to give a 25% bonus for employees whose salaries are less than 3000$ due to holidays. Write a java program that asks the user to enter his/her name, and his/her work position. The program should calculate and display the total salary of the employee based on his/her salary position, the bonus amount and the final salary for an employee. Make sure that your program outputs exactly as the sample run below. Sample Run1: Enter Your Name: Ali Enter Your Position (M for Managers, S for Supervisors or P for Sales Person): M Fixed Monthly Salary 3500$ 2100$ Manager Salary: $3500.0 $0.0 Internet Service Bill 700$ Sample Run2: Enter Your Name: Cerine Enter Your Position (M for Managers, S for…Control structures: In Java only please. Output the position of the largest number and the largest number in the squence a0, a1, a2....ak. For example, the largest number of the squence is 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1 is 340, and it's position is 4. Test your program for the following values of x: 75, 111, 678, 732, 873, 2048, and 65535. Thank youCreate a length converter program in JAVA. The program should input the choice from the user. If the choice is 1 then the program should input a length from the user in centimetres and convert that length to inches. If the choice is 2 then the program should input a length from the user in inches and convert that length to centimetres. If the choice is 3 then exit the program.
- Calculate your Physics final Write a Java program to solve the following problem: grade based on the following: Assessment Percent Lab Activity(ies) Quiz (zes)/Test (s) 10% 10 Assignment (s) 208 Midterm Exam (8) 20% Final Exam 40% Theory grade is the quiz/test, midterm and final exam marks. Practical grade is the assignment and lab marks. Final grade is all five marks. But the calculation of Final grade needs to comply with the following rule: If either of the practical or theory grade is less than 50%, the final grade is the lesser of the two. A grade letter must be assigned based on the final grade (See the courses outline for the distribution of grades) You must implement input validation for each mark as follows: Lab mark must be out of 10. Quiz/Test mark must be out of 10. Assignment mark must be out of 20. Midterm mark must be out of 20. Final Exam must be out of 40. Bonus: Modify your code so that you can calculate and display grade for N number of students. Your program must…Java Programming control structures:\ The population of Town A is less than the population of Town . However, the population of Town A is growing faster than the population of Town B. Write a program that prompts the user to enter the population and growth rate of each town. The program outputs after how many years the population of Town Aa will be greater than or equal to the population of Town B and the populations of both towns at that time. Sample input is: Population of Town A = 5,000, growth rate of town A =4%, populatio of Town B = 8,000, and growth rate of town B = 2% Here's my code and something is not right static Scanner console = new Scanner(System.in);public static void main(String[] args) {int populationA;int populationB;int projectedYears; int futurePopulation;double townAGrowthRate;double townBGrowthRate;System.out.print("Enter the population for Town A and Town B "+ "(population of Town A should be less than Town B): \n");populationA = console.nextInt();populationB =…Symptoms of diabetes often appear suddenly and are often the reason for checking blood sugar levels. Depending on the sugar level following category is defined. Sugar Level(mmol/L) Less than 7.8 Category Normal Between 7.8 and 11.0 11.1 and above Prediabetes Diabetes You are assigned to write a program that can find whether a patient is diabetes suspected or not. Write a java program that will take sample of sugar level in blood of 11 patient of a clinic. You must take input using Scanner class. Your program must print the number of patient at each category and the maximum sugar level in each category. A sample input and output for this program is given below. Sample Input: 7.5, 8.9, 8.0, 5.0, 5.2, 3.2, 7.9, 12.0, 10.30, 16.0, 5.5 Sample Output: Normal Total: 5; Max Sugar Level: 7.5 Prediabetes Total: 4 Max Sugar Level: 10.30 Diabetes Total: 2 Max Sugar Level: 16.0
- The two forces acting on an aircraft in flight are lift (acting upwards) and weight (acting downwards). If the lift of the aircraft equals the weight of the aircraft, then the aircraft neither goes up nor down, it is in level flight. If the lift is greater than the weight, then the aircraft climbs (gains altitude). If the weight is greater than the lift, then the aircraft descends (loses altitude) Write a Java program named Flying that calculates whether an aircraft is flying level, climbing or descending. The basic equation to calculate this lift is known as the Flight Equation. The Flight Equation is: L = 1 / 2 * ρ * v2 * s *cl where L = lift (in Newtons), this must equal the weight of the aircraft for the aircraft to fly. To convert kilograms to Newtons multiply kilograms by 9.8 ρ = density of the air, in kg / m3 This value is a maximum of 1.2 at sea level and decreases as altitude (height) increases v = current speed, in metres / second of the aircraft. s = surface area…The two forces acting on an aircraft in flight are lift (acting upwards) and weight (acting downwards). If the lift of the aircraft equals the weight of the aircraft, then the aircraft neither goes up nor down, it is in level flight. If the lift is greater than the weight, then the aircraft climbs (gains altitude). If the weight is greater than the lift, then the aircraft descends (loses altitude) Write a Java program named Flying that calculates whether an aircraft is flying level, climbing or descending. The basic equation to calculate this lift is known as the Flight Equation. The Flight Equation is: L = 1 / 2 * ρ * v2 * s *cl where L = lift (in Newtons), this must equal the weight of the aircraft for the aircraft to fly. To convert kilograms to Newtons multiply kilograms by 9.8 ρ = density of the air, in kg / m3 This value is a maximum of 1.2 at sea level and decreases as altitude (height) increases v = current speed, in metres / second of the aircraft. s = surface area…The two forces acting on an aircraft in flight are lift (acting upwards) and weight (acting downwards). If the lift of the aircraft equals the weight of the aircraft, then the aircraft neither goes up nor down, it is in level flight. If the lift is greater than the weight, then the aircraft climbs (gains altitude). If the weight is greater than the lift, then the aircraft descends (loses altitude) Write a Java program named Flying that calculates whether an aircraft is flying level, climbing or descending. The basic equation to calculate this lift is known as the Flight Equation. The Flight Equation is: L = 1 / 2 * ρ * v2 * s *cl where L = lift (in Newtons), this must equal the weight of the aircraft for the aircraft to fly. To convert kilograms to Newtons multiply kilograms by 9.8 ρ = density of the air, in kg / m3 This value is a maximum of 1.2 at sea level and decreases as altitude (height) increases v = current speed, in metres / second of the aircraft. s = surface area…