JAVA Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2 / 2 * a Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared ( m/s2 ) , then displays the minimum runway length needed to take off. Here is a sample run: Enter speed and acceleration: 60 3.5 [enter] The minimum runway length for this airplane is 514.286
Q: Write a program that reads in three strings, sorts them lexicographically, calculates the size of…
A: required: To Write a program that reads in three strings, sorts them lexicographically, calculates…
Q: The annual rate of inflation is the rate at which money loses its value. For example, if the annual…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: 4. Before you can cross a bridge with your car, it must weigh within +/- 100 pounds of 1 ton For…
A: Hey, since multiple questions posted, we will answer first question according to our policy. If you…
Q: You have been asked to write a program to play rock-paper-scissors. Your program will ask the user…
A: PROGRAM CODE: import java.io.*;import java.util.*; class Main { public static String…
Q: Write a program in java that is going to read m donors' name surname and the amount donated, and…
A: PROGRAM EXPLANATION : - For sorting the Donors based on amount they have donated, it is good idea to…
Q: 1. Write a java program that asks the user to input two integers intStart and intEnd then computes…
A: Please find the answer below :
Q: GradeProblemUsingSwitch_FamilyName A professor converts numeric grades to letter grades in the…
A: As per the request program is completed. Note: In the question 100 case is not mentioned, so the…
Q: I need help writing a Java Code. Write a program that prompts the user to enter an integer for…
A: As given, we need to write a Java code that prompts user to enter an integer for today's day of the…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: The solution for the above-given question is given below: As you can see in the output for the given…
Q: (Java) Write a program that reads two numbers from the keyboard representing, respectively, an…
A: the answer is given below:-
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Actually, the code has given below:
Q: Write a program that prints a grocery receipt of items purchased.
A: EXPLANATION- Create main function . Declare seven variables with suitable names Initialize all the…
Q: Computing A Raise File Salary.java contains most of a program that takes as input an employee's…
A: - We need to compute the raise in salary according to the java code with desired ratings.
Q: a random number between 1 and 5. If they guess right, they get 10 points added to their score, and…
A: Below the python program user to guess a random number between 1 and 5. If they guess right, they…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Actually, the code has given below:
Q: Write a program that asks user to enter a number until user enters -1. Then the program should…
A: Here, Code instructions are given.
Q: The parity bit of a sequence of bits is 0 if the number of 1's in the sequence is even and 1…
A: The parity bit is an error-checking bit that is used to append to the string. For even parity, the…
Q: Practical quiz 2 Write a Java program that will ask the user for the number of rooms (including…
A: import java.text.DecimalFormat;import java.util.Scanner; public class RoomChargeMain { public…
Q: can you please write it in java.scanner.util form The Fast Freight Shipping Company charges the…
A: For every 500 miles the charges applies So, you can divide the distance by 500 and get the rate
Q: In this exercise you will write a program to compute the distance between any two geo locations. In…
A: we have given GeoLocation class we have to implement its main method which is given below
Q: How do I solve this 3 step problem dealing with fitness and calorie tracking in java? thnks and…
A: Hello. Since you have posted multiple questions and not specified which question needs to be solved,…
Q: The equation of a straight line is written as y = mx + b where m is the slope of the line and b is…
A: The standard types of the situation of a line are: Incline catch structureBlock structureTypical…
Q: Using While Loop in Java Write a program that let the user include his or her three (3) grades.…
A: Algorithm Start Var grade [3], sum=0 Accept all 3 grade from user Compute sum of these grade in sum…
Q: in java write a program that reads an unspecified number of integers, determines how many positive…
A: //import the required packages import java.util.Scanner; //define a class AvgWithLoop public class…
Q: Write a program that plays the popular scissor–rock–paper game. (A scissor can cut a paper, a rock…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args)…
Q: Program61.java Write a program that prompts an employee to enter his/her hourly pay rate and hours…
A: According to Bartleby policy, I have provided program61.java in Step 2.
Q: // for some reason this code isn't working.// import java.util.Scanner; Write a program whose…
A: Answer: Explanation: What was the error in your code so we will see one by one 1. we have change the…
Q: write a program in python Write a program that will allow a student to enter their name and then…
A: In order to solve this first we need to initiate count to 0 and the count the correct answers by…
Q: At a coffee shop , a coffee cost $1. Each coffee you purchase, earns one star. Seven stars earns a…
A:
Q: 4.Write a program that displays a Pascal triangle. The program prompts the user to enter the number…
A: The answer is in below steps:
Q: A Newton number is a 4-digit integer number for which the sum of its digits to power 4 is equal to…
A: import java.util.Scanner; import java.lang.Math; public class NewtonNumber { public static void…
Q: This question is for java. Write a program that plays the Hi-Lo guessing game with numbers. The…
A: Java program to solve the given problem is below.
Q: **CODE IS IN JAVA** Modify the BarChart program from Chapter 6 Exercise 13 to accept the number of…
A: Coded using Java.
Q: A patient suffering from asthma needs to keep a diary of their “peak flow" breathing readings. This…
A: Given:
Q: Write a Java program that reads a line and a line segment and then determines whether they intersect…
A: Given :- Write a Java program that reads a line and a line segment and then determines whether they…
Q: 1. Write a program that computes the area of each color in an archery target. For simplicity, we…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: A python program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: import random random.seed(300) def determineWinner(playerChoice, computerChoice): # Checking…
Q: Java code for this: Given two number for the variables A and B, create a program that would: A.…
A: Write a program using java that will follow the following conditions and given output: Given two…
Q: This java program outputs a downwards facing arrow composed of a rectangle and a right triangle. The…
A: PROGRAM CODE: // import required libariesimport java.util.*;public class Main{ // start…
Q: Write a program, named last10.java, whose input is an unknown number of integers. The program stops…
A: JAVA PROGRAM: import java.util.*; class Main { public static void main(String args[]) {…
Q: E2.8 Write a program that asks the user for the lengths of the sides of a rectangle. Then print •…
A: As you have not mentioned any specific language so I give the code in Python along with output and…
Q: Write a java program that calculates the depreciation of your assets for several years. The program…
A: Program Approach: Import necessary header files for the standard I/O operations. Declare the main…
Q: basic java please Write a method called findTip that finds the value of a meal as a double…
A: In this code, a function named findTip is called in the main function and the tip is added to the…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the com- puter.…
A: import java.util.Random;import java.util.Scanner; public class Main { public static int…
Q: n that will determine the gross pay for each of three employees using an array, a loop, the if-else…
A: We need to define an employee class with name, hourly rate and hours worked like input and we need a…
Q: 1. Write a program that computes the area of each color in an archery target. For simplicity, we…
A: ANSWER:-
Q: The parity bit of a sequence of bits is 0 if the number of 1’s in the sequence is even and 1…
A: An array is a linear data structure that stores data in a sequential manner. Each element is linked…
Q: In Java: Forms often allow a user to enter an integer. Write a program that takes in a string…
A: Actually, the code has given below:
Q: Write program that can be used by a small theater to sell tickets for performances. The theater's…
A: Solution: Given, program that can be used by a small theater to sell tickets for performances.…
JAVA
Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2 / 2 * a
Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared ( m/s2 ) , then displays the minimum runway length needed to take off.
Here is a sample run:
Enter speed and acceleration: 60 3.5 [enter]
The minimum runway length for this airplane is 514.286
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- TotalPayAA.java Write a program that will calculate an employee’s total pay for a week (hourly pay + commission). Your program should ask the user how many hours they work and then their total sales amount. Hourly Wage - Their hourly wage is $11.50 for the first 40 hours and then time-and-a-half ($11.50 * 1.5) for anything over 40 hours. Commission - Commission is a small percentage of total sales that the employee earns. Total Pay – Total hourly wages + commission Commission for sales is shown: Sales Commission $0.00 - $99.99 5% of total sales $100.00-$299.99 10% of total sales $300.00+ 15% of total sales Make sure you print back to the user their total pay for the week. Money values should be formatted appropriately and your output should be descriptive as in the example. Test values: 10 hours + $10 sales =…JAVA PROGRAM Chapter 5. PC #2. Retail Price Calculator (page 312) Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00. • If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments, and returns the retail price of the item. Class name: RetailPriceCalculator PLEASE FIX AND MODIFY THIS JAVA PROGRAM SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASE. RIGHT NOW IT SAYS 0 OUT 5 PASSED. THE PROGRAM IS NOT WORKING IN HYPERGRADE FIX IT SO IT WILL WORK IN HYPERGRADE. THANK YOU. import java.util.Scanner;public class Main { public static double…JAVA PROGRAM Chapter 5. PC #2. Retail Price Calculator (page 312) Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00. • If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments, and returns the retail price of the item. Class name: RetailPriceCalculator PLEASE MODIFY THIS JAVA PROGRAM SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASE. RIGHT NOW IT SAYS 0 OUT 5 PASSED. THE PROGRAM IS NOT WORKING IN HYPERGRADE FIX IT SO IT WILL WORK IN HYPERGRADE. THANK YOU. import java.util.Scanner;public class Main { public static double calculateRetail(double…
- Java Program Chapter 5. PC #2. Retail Price Calculator (page 312) Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00. • If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments, and returns the retail price of the item. Class name: RetailPriceCalculatorProblem Description: The international standard letter/number mapping found on the telephone keypad is shown below: Write a pseudocode and program that reads a letter and displays its corresponding digit. 2 3 1 ABC DEF 4 5 6 GHI JKL MNO 7 8 9 PQRS TUV WXYZ 0 Write a pseudocode on how you would solve the problem in your own word. Write a java program called Phone considering the following directions. Practice here first then write answer on the answer sheet. Also, make sure distinguish high and low caps as Java is case – sensitive. Import and declare a Scanner class Ask user for an Upper – case letter Use the switch statement along with case and break Use the System.exit(1) in the default to terminate the program Print the corresponding digitHangmanAA.java For this program, you will create the game Hangman. (If you are unsure of how to play Hangman, Google it.) The game will start by asking player 1 for a word or phrase (can be multiple words). Then player 1 will be asked how many missed guesses are allowed by player 2. Once this information is received, player 2 will take over. (Have the program print many blank lines of space so that player 2 can’t see what player 1 entered.) The instructions should be displayed for player 2 as well as the number of misses they’re allowed to make before they lose the game. The screen should also output dashes or underscores to represent each letter of player 1’s secret word/phrase. Player 2 should guess one letter at a time. Case should not matter. Typing x or X should give the same result. If that letter is present in the mystery phrase, then it should be displayed. (It will replace the dash/underscore in that spot. Spaces, punctuation, and all other non-alphabetic characters should…
- Java Programming Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because ticket agents frequently mistype long ticket numbers, Travel Tickets has asked you to write an application that indicates invalid ticket number entries. The class prompts a ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you drop the last digit of the number, then divide the number by 7, the remainder of the division will be identical to the last dropped digit. This process is illustrated in the following example: Step 1. Enter the ticket number; for example, 123454. Step 2. Remove the last digit, leaving 12345. Step 3. Determine the remainder when the ticket number is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4. Assign the Boolean value of the comparison between the remainder and the digit dropped from the ticket number. Step 5. Display the result—true or false—in a message box. Accept the…Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…Java Calculating the User's Sum Write a complete program that reads in numbers and calculates the sum of the numbers in that range. Code Specifications In the main method, read input from the user. Read in two integers from the user: a lower end of the range and an upper end of the range. Check if the numbers are valid: the lower number cannot be greater than the upper number. If the numbers are invalid, use a loop to ask for new numbers. Continue looping until you get two valid values. Write a method called calculateTheSum. The method takes in a lower and upper end of the range. The method calculates the sum of all values from lower (inclusive) to upper (inclusive). Invoke the method from main the output the result. Test Cases I recommend testing your code using the test cases below. I've listed the user inputs along with a sample of the result. User Inputs Result lower = 10, upper = 1 the program should ask for new input lower = 5, upper = -5 the program should ask…
- Java Your program will read in a credit card number and expiration date from the user and validate the data. The program will continue to ask for user input until a valid number and date are entered. The rules for what is valid are specified below. readYear() and readMonth(int) methods Complete the readYear() and readMonth(int) methods. These methods ask the user to input the expiration year and month of their credit card. Each method should contain a loop inside the method so the code repeats until a valid month or year is entered by the user. If the user enters an invalid year or month, print an error message and ask them to try again. The readMonth(int) method reads in the month as a number. A valid month is any number between 1 and 12 (inclusive). A valid year is 2022 or later. readCreditCardNumber() method Complete the readCreditCardNumber() method. This method asks the user to input their credit card number. This method should contain a loop so the code repeats until a valid…JAVA Write a program that prompts the user to enter a line of text and displays the letter that has the most occurrences with the number of occurrences. For example, if “I ate an apple.” was entered, the letter ‘a’ occurred the most often. If not one but several letters have the most occurrences, all of them should be reported. For example, since ‘o’ and ‘t’ appear three times in “I went to the zoo.”, both occurrences should be reported. Sample Run: Enter a line of text: I ate an apple. The following letter(s) occurred most [3 time(s)]: a Enter a line of text: I went to the zoo. The following letter(s) occurred most [3 time(s)]: o t Write the program allowing the user to input a string. If the user inputs a capitalized letter within the string, such as ‘A’, have the program change all capitalized letters to lowercase. This program should display the letter that has the most occurrences with the number of occurrences.This is the question: Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. The output would then be The factorial of 4 is 24. This is the code given: public class Factorials { public static void main (String args[]) { // Write your code here } }