Write a java code for finding the probability of doing anything from the user entered probability of not doing anything.
Q: Write a java code to get the kinetic energy of rotation after taking moment of inertia and angular…
A: Required:- Write a Java Code to get the kinetic energy of rotation after taking a moment of inertia…
Q: Write a JAVA program to get the value in poise after taking the value in poiseuille form
A: The Poiseuille's formula finds the disharged streamlined volume flow through a smooth-walled…
Q: Write a Java program for a Play-House Manager, who would like to calculate the total profit from…
A: Here is java code to implement above problem.
Q: Write a Java code to get the velocity of efflux of water flowing from a hole at a height h from…
A: Required:- Write a Java code to get the velocity of efflux of water flowing from a hole at a height…
Q: Write a java program that accepts a sentence from the user and prints out the sentence with all…
A: Write a java program that accepts a sentence from the user and prints out the sentence with all…
Q: Write a Java program that prompts for and reads in the sales for cach of 5 sales persons in a…
A: I have provided Java code which will find out the total and average sales of 5 persons. Also,…
Q: Write a Java Program to take 3 integens from the user, one of them is small, one is medium and one…
A: Write a Java Program to take 3 integers from the user, one of them is small, one is medium and one…
Q: Write a Java Program to print true if for every *** (star) in the string, if there are chars both…
A: From the given data, We need to take the input string from the user and print true if for every '*'…
Q: Write a Java program asking a user to enter a letter. If the entered letter is in the text ‘Hello…
A: /*Java program to ask user to enter a letter, if letter exist in "Hellow Word"print Hello else…
Q: Write a Java program that converts temperatures using two methods, you will write and call these two…
A: Here let's define two static methods converToCelsius and convertToFahrenheit to do the following…
Q: Write a java code to take the number of students, their names, their GPA, and their id, and show the…
A: Objective: We need to design a Java program to take details of students (name, id, and GPA). The…
Q: Write a complete Java program that asks the user to input the radius (r) and the height (h) of a…
A: Please find the answer below :
Q: Write a Java program that creates and displays the following GUI. (In this problem there is no need…
A: package javafxapplication1; import javafx.application.Application;import…
Q: Write a java program to find the recoil momentum of the atom of an isolated hydrogen atom emits a…
A: Required:- Given the atomic number of atom: 5 and we have to find the energy required to remove the…
Q: Write a piece of Java code that illustrates the finally keyword that prints a “Thank you !”
A: import java.util.Scanner; import java.io.File; Scanner in = new Scanner(new public class…
Q: Write a java program that ask the user to enter number of days in the month, then reads the daily…
A: logic:- read value of n iterate from I=0 to I<n Read values in array arr. end loop set…
Q: Write a java program that can suggest an activity based on the temperature. If the temperature is…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Q: Write a java program to print the flag of America. Don't hard code it.
A: Given: To write java program to print flag of America.
Q: Write a java program to find the depreciation using the amount = 1000 and rate = -7 and year is 5
A: 1) Below is JAVA program to calculate depreciation of amount 1000 after 5 years at rate of -7…
Q: Write a Java program to get the mobility after taking magnitude of drift velocity per unit electric…
A: Required:- Write a Java program to get the mobility after taking the magnitude of drift velocity per…
Q: Answer? Prompt the user for a number x and output the sum of all numbers from 1 to x. If the…
A: Given: To write a java code.
Q: Write a Java program called IntCheck that examines the integer variable x, printing GT (greater…
A: // Defining the Main Classpublic class Main{ // Function to check the Number x public void…
Q: Write a java program to check whether the current user is a robot or not. If yes then deny it's…
A: The program ask user to type "YES" in order to check if he is robot or not. If the user typed…
Q: rite a java program that reads a sets of integers and then finds and print the sum of the even and…
A: Required: Write a java program that reads a sets of integers and then finds and print the sum of the…
Q: Write a Java program which allow user to enter a number that represents repetition. Then, the user…
A: In this question, we are writing a java program which calculate the average of numbers and count how…
Q: Write a java program that reads 2 decimal numbers (x , y) and then calculates and prints the sum of…
A: Required:
Q: write a Java program using Scanner class that accepts data for a customer name, wood type, number…
A: import java.util.*;public class Main { public static void main(String args[]) { Scanner in…
Q: Write a Java Program below Get the value from a user? - Find the Area Of Circle - Find the Average…
A: Please find the answer below
Q: Write a Java program that asks the user to enter positive numbers, and store it into (myArray) of…
A: import java.util.*;public class Main{ public static void main(String[] args) { Scanner scan =…
Q: In java Write a program on difference among if and switch?
A: import java.util.*;public class Main{ public static void main(String[] args) { char InputVar;…
Q: Write a java program to find the area of square, rectangle and circle using the method over loading.…
A: Required:- Write a Java program to find the area of a square, rectangle, and circle using the method…
Q: Write a Java program that print out its own text.
A:
Q: Write a java program where a user enters and stores the average monthly rainfall figures (int) for…
A: import java.util.ArrayList;import java.util.Scanner; public class TownRainfall{ public double…
Q: Write a java program by taking radius of circle, length and breadth of rectangle, side of square and…
A: Write the java program as follows: Declare the required variables for the radius of the circle,…
Q: write a code for costumercheckout.java and test file. give explanation "implement the observers for…
A: Start Customer required items Scan the items customer want Calculate the price to checkout After…
Q: Write a JAVA program in which an employee enters his/her age(in years) and the program tells whether…
A: Write a JAVA program in which an employee enters his/her age(in years) and the program tells whether…
Q: Write a java code to get the kinetic energy of rotation after taking angular momentum and angular…
A: Required:- Write a Java Code to get the kinetic energy of rotation after taking angular momentum and…
Q: Write a java program to help the student to arrange his Diploma Marks of 12 subjects from high to…
A: Ascending order: Sorting the elements of the array from low values to high values is called…
Q: ) Write a Java method that prints integers from 1 to 100 (see the output). Use the following…
A: Please find the answer below
Q: Write a Java Program to Find Area of Square, Rectangle and Circle using constructor Overloading.
A: Constructors have same name of the class but with number of arguments. Constructors can be…
Q: Write a java application that prompts for the number of hours that an employee worked in a week
A: use concatenation operator + to make program interface good with user. It will ask user name and…
Q: Write a Java program to find the total runs scored by 11 players of a team, take input runs of all…
A: Write a Java program to find the total runs scored by 11 players of a team, take input runs of all…
Q: Write a line of Java code that will give the name ANSWER to the int value 42.In other words, make…
A: - The question wants to know how to initialise a named constant ANSWER with an integer value 42 in…
Q: Write a java program to find the batting average of user taken total runs, user inputted number of…
A: start input total runs , number of innings , notout calculate batting average…
Q: Write a java program to get the commission on a product if you take the 15% commission. You have to…
A: Required:- Write a java program to get the commission on a product if you take the 15% commission.…
Q: Write a java code to get a square star pattern after taking the height of square from user
A: Given:
Q: Write a java program which reads the number between 0 to 100 and find out how many such numbers are…
A: Code: public class Repeat { public static void main(String args[]) {…
Q: Use your imagination to come up with a situation where you can write a program that contains two…
A: break statement is useful in exiting the loop before reaching the last iteration For example, you…
Step by step
Solved in 3 steps with 1 images
- The following problem shows up in a number of Java texts, including Savitch's textbook: The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The calories needed for a woman to maintain her weight is: WBMR = 655 + (4.3 × weight in pounds) + (4.7 × height in inches) − (4.7× age in years) The calories needed for a man to maintain his weight is: MBMR = 66 + (6.3 × weight in pounds) + (12.9 × height in inches) − (6.8 × age in years) A typical chocolate bar will contain around 230 calories. Write a program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age. NOTE: This is an application of a selection statement! Input Data: Use a named constant for the…Write a program to ask user to enter number of codes. Assign a letter for each code and possibility. Create a Huffman code for each letter.Please write program in javaUsing Java's card graphics, create a card game in which the dealer shuffles the deck and deals 13 cards to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat 4 times so all the cards are dealt eventually. Internally, the player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again."
- Write a program 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 is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’tdisplay the computer’s choice yet.)2. The user enters his or her choice of “rock,” “paper,” or “scissors” at the keyboard.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. (Therock smashes the scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins.(Scissors cuts paper.)• If one player chooses paper and the other player chooses rock, then paper wins. (Paperwraps rock.)• If both players make the same choice, the game must be…Write a Java program code: Scenario:One of the renowned supermarket in Dhaka City, “Shwapno” is celebrating their firstanniversary of opening. They have become very popular among people in a short amount oftime. As a method of celebration they have designed three interesting and exciting offer for theircustomers for that day only!! The offers are described as follows:Offer 1: This offer says, if the name of any customer starts with “S” OR ends with “o”, theywill receive a gift which contains 1 kg miniket rice and 1 litre soyabean oil. This offer isdedicated from their name, Shwapno.Offer 2: This offer says, if one customer have taken products and his/her total product weightis less than 1.50 kg, then Shwapno will give all the products to the customer for free. If the totalweight is 1.50 kg or more, the customer will have to pay the full amount.Offer 3: This offer says, if a customer is aged less than 15, then he/she will receive chocolates.If aged 15 or more, then no gifts for the…In Java Language, Write a Program that will compute the total tuition fee of a student. Input the name and student number of the student. Input the subject enrolled, the number of units, and the cost per unit to compute the total tuitionNote* Use methods and constructor
- Use JAVA CARD GRAPHICS to create a card game in which the dealer shuffles the deck and deals 13 cards to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat 4 times so all the cards are dealt eventually. Internally, the player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again." Also create a unit test for the win and loose cases.Write a Java program that inputs three integer variables (called a, b, and c) that represent the length of the sides of a triangle. Your program should store the type of the triangle in an enumeration variable (called type), and display the value of the variable type. Here are the steps to follow: 1- Defines an enumeration to represent the different triangle types: EQUILATERAL, ISOSCELES, SCALENE, and ERROR. The type ERROR is added in case that the value of any triangle sides is less than or equal to zero. 2- Declare then input the three integer variables a, b, and c using a scanner object called keyboard. 3- Declare the enumeration variable type. 4- Determine the type of the rectangle (i.e. Assign a value to the variable type) 5- Print the value of the variable type. NOTE: If all sides are equal, the rectangle is EQUILATERAL. If only two sides are equal, the rectangle is ISOSCELES, otherwise the rectangle is SCALENE. Note that the type of the rectangle should be ERROR if the length…Write a java program that asks the user to enter the coordinates of 4 points that draw two different lines. The program has to display whether these two lines are parallel, perpendicular, or neither according to the following formula: Slope y2-y1 x2-x1 If the slopes of both lines are equal, the two lines are parallel If the product of both slopes is equal to -1, the 2 lines are perpendicular. Otherwise, the two lines are neither parallel nor perpendicular.
- Use JAVA to create a card game in which the dealer shuffles the deck and deals 13 cards out of the 52 to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat this process 4 times so that all the 52 cards are dealt. The player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again." Also create a unit test for the win and loose cases. Create an orignal code with Java card graphics. Please do not reshare a similar answer!Use JAVA to create a card game with card graphics in which the dealer shuffles the deck and deals 13 cards out of the 52 to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat 4 times so all the cards are dealt eventually. Internally, the player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again." Also create a unit test for the win and loose cases. Do not use python please!!!Prime number is the number that is divided by one and itself only, Twin Prime is a pair of prime numbers that differ by 2. For example, 3 and 5 are twin primes, 5 and 7 are twin primes, and 11 and 13 are twin primes. Write a java program to find all twin primes within a range of 1 up to a number entered by user, such that, that the entered number should be greater than 10. The program has to have a method that takes an integer as a formal parameter and returns if that number is prime or not. Display the output as follows: Enter an integer (greater than 10): 7 Not accepted number! Enter an integer (greater than 10): 50 The number of twin prime numbers up to 50 are: (3, 5) (5, 7) (11, 13) (17, 19) (29, 31) (41, 43)