Write a Java method to compute the future investment value at a given interest rate for a specified number of years.
Q: Write a java program to find the power for the mechanical system after taking force and velocity…
A: The problem is based on the basics of arithmetic operations in java programming language.
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 program with the following: A method with name display to display the average time,…
A: Programming instructions: Include necessary header files. Create required variables. Create a…
Q: Write a program in java to compute the population of current year,if the population of current year…
A: Program approach - Declare the class. Define the main method. Declare the variables needed for the…
Q: Write a program in java to convert Temperature Celcius to Fahrenheit?
A: Logic:- read temperature in celcius calculate f=(c*9)/5 +32 display f
Q: Write a java method to calculate the area of the square(the method should take one parameter
A: A java method to calculate the area of a square: // Java program to find the area of// the multiple…
Q: convert a temperature F to C Use static method convert () and formula for
A: EXPLANATION To convert Fahrenheit into celsius a simple formula is used. temperature in celsius =…
Q: Write a Java program to find the speed of transverse wave on string after taking tension and mass…
A: According to the information given:- We have to calculate the speed of the transverse wave on string…
Q: Write a java program to print the flag of America.
A: I have answered this question in step 2.
Q: Write the JAVA programming language to get the following output with using more than one…
A: Here is the detailed explanation of the solution
Q: a three-month delivery report for three diffrent years. The following rows and columns represent the…
A: Step 1: Below the java program to display a three-month delivery report for three different years
Q: Write a Java program that prints the number of odd numbers from 1 100 and print each even number in…
A: Algorithm : Step 1 : declare variables. Step 2 : initialize counter variable to 0. Step 3 : use for…
Q: Write a Java program that can read a commodity code, quantity of the commodities bought and the unit…
A: public class Tester{ public static void main(String[] args) { String commodity; int quantity;…
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 print the following pattern: * *** ***** ******* *********…
A: Code: import java.util.Scanner; public class Main { public static void main(String args[]) { int…
Q: Write a java program to find the distance travelled by a car by taking the speed and time
A: As given, I need to write a Java program that takes speed and time as input and find distance. The…
Q: Write a Java program that calculates the average student's score and percentage
A: Required: Write a Java program that calculates the average student's score and percentage
Q: Write a Java program to find the calculate the average of 3 subjects for 5 students using do… while…
A: This code have written java as asked in the problem. we get input from user to get average of mark…
Q: Write a JAVA program that accepts as input the mass (in grams) and density (in grams per cube…
A: Please find the answer below :
Q: Write a JAVA program to prompt the user to enter a non-negative integer value and print "Yes" in the…
A: Write a JAVA program to prompt the user to enter a non-negative integer value and print "Yes" in the…
Q: Write a Java program to read two values and interchange the values without using a third variable| 1…
A: As per the above listed problem statement we have to develop a JAVA code to read 2 values and swap…
Q: Write a JAVA program to take input the number of hours, minutes and seconds and print the total…
A: GIVEN:
Q: Write a java program to form a committee of 3 women that can be choosen from 9 men and 12 women
A: Find the java code:
Q: write a java program to print numbers 1 to 100 in order and in reverse order.
A: Here is Your Code public class Main{ public static void main(String[] args) { for(int…
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 find the values of X, Y and Z[1,10] that satisfy the following equation:…
A:
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: Write a Java program to generate a user's daily average number of walking steps for a given month of…
A: In this question, we are asked to write a java program which calculate the average of walking…
Q: Write a java program to calculate the final price of the product after applying 25% discount on the…
A: To calculate the final price after discount, we will have to multiply the actual price with the…
Q: Write a java program to find the radius of a Gyration of a cube about an axis passes through the…
A: With the help of radius of gyration, the moment of inertia can be determined. Radius of a Gyration…
Q: Write a Java program that solves a set of quadratic equations as per Requirement #1 (without using…
A: import java.util.Scanner; public class Tester{ public static void main(String[] args){ Scanner…
Q: Write a JAVA program to check if a given number is ArmStrong number or not. Hint :- Armstrong Number…
A: Below is the required code in java and sample output:
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 program in Java that will compute the average grade of three (3) quizzes.
A: Given: TO write a java program that will compute the average grade of three quizzes.
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 Java program that print the following series of integers 1, 5, 9, 13,…
A: class Test160 { public static void main(String args[]) { int s = 0; for(int i = 1; i <= 2005;…
Q: print numbers reversed from 1 to 100.
A: Here, the static recursive method named reverse displays the reverse of a number. In the main method…
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: Create a Java program that loops around getting two fractions from the user, output their sum, and…
A: PROGRAM EXPLANATION: - The Fraction is a Zero fraction if the numerator is 0 and the denominator is…
Q: Write a Java Program to input date,year,month from user.It shoulds have methods to get…
A: Code: import java.util.Scanner;//Data.javapublic class Date { Scanner sc=new…
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 program to read the sales data from the file and to calculate and display the total…
A: Below is the required code in java and sample output:
Q: Write a java program to find the charge flown through the wire when there is current through a wire…
A: Required:- Write a java program to find the charge flown through the wire when there is current…
Q: In Java Determine the output of the following: x = 3; while (x = 25) x = 4 * x
A: Java is one of the languages, which is considerably used in many sectors of Computer. In older…
Q: Write a java Program that Convert Fahrenheit To Celsius
A: Given: Write a java Program that Convert Fahrenheit To Celsius
Q: Write a Java program to compute student results and GPA
A: Algorithm: Start Read no.of subjects n Read Mark's Convert Marks into grades by dividing with 10…
Q: Write a java program to get the future value of an investment and take all the required arguments…
A: Required:- Write a java program to get the future value of an investment and take all the required…
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.…
Trending now
This is a popular solution!
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 method in java program that calculates the factorial of an integer positive number entered by the userWrite a java program An Abundant number is a number for which the sum of its proper factors is greater than the number itself. An deficient number is a number for which the sum of its proper factors is smaller than the number itself . Write a program to input a number and check and print whether it is an Abundant or deficient number or not. Example: Consider the number 12. Factors of 12 = 1, 2, 3, 4, 6 Sum of factors = 1+ 2+ 3+ 4 + 6 = 16 As 16 > 12 so 12 is an Abundant number. Consider the number 8 Factors of 8 = 1, 2, 4 Sum of factors = 1+ 2+ 4 = 7 As 7 < 8 so 8 is a deficient number
- Write a program code in Java Write a program to compute the ideal weight for both males and females. According to one study, the ideal weight for a female is 100 pounds plus 5 pounds for each inch in height over 5 feet. For example, the ideal weight for a female who is 5'3" would be 100 + 15 = 115 pounds. For a male the ideal weight is 106 pounds plus 6 pounds for each inch in height over 5 feet. For example, the ideal weight for a male who is 6'2" would be 106 + 14*6 = 190 pounds. Your program should ask the user to enter his/her height in feet and inches (both as integers -- so a person 5'3" would enter the 5 and the 3). It should then compute and print both the ideal weight for a female and the ideal weight for a male. The general outline of your main function would be as follows: Declare your variables (think about what variables you need -- you need to input two pieces of information (what?), then you need some variables for your calculations (see the following steps) Get the…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…Use java Only. Introduction: The equation of a straight line is written as y = mx + b where m is the slope of the line and b is the value of y when x = 0. If there are two coordinate points of the line are given, then it is very easy to compute the line equation. Also you can find the distance between two points. Problem: Write a program to compute lines equation for a set of lines. The number of lines is read from the user. Each line is computed by generating two points randomly using Point2D API. In addition, distance between two points is computed. The program should display a table which include all information about each line. See sample runs below. Take into consideration: 1. Number of generated lines should be greater than zero. 2. Two point objects are constructed only once. Then just update the location of two points for each line using Point2D API methods. 3. x and y values of each point are generated randomly to be less than 100 and greater than 0. 4. Compute the distance…
- In JAVA ASSIGNMENT DESCRIPTION: A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:System.out.printf("After 6 hours: %.2f mg\n", yourValue); Ex: If the input is: 100 the output is: After 6 hours: 50.00 mg After 12 hours: 25.00 mg After 24 hours: 6.25 mg Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg. THE CODE I HAVE SO FAR: import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); double caffeineMg; // "double" supports floating-point like 75.5, versus int for integers like 75. caffeineMg = scnr.nextDouble(); System.out.printf("After…WRITE A JAVA PROGRAM. Telco is a cellular telephone company that offers two types of service: standard and premium. Its rates vary, depending on the type of service. The rates are computed as follows: Calculate the amount due if given a service code (s or S means standard service; a service code of p or P means premium service), and the number of minutes the service was used. For the premium service, the customer may be using the service during the day and the night. Therefore, to calculate the bill, you must ask the user to input the number of minutes the service was used during the day and the number of minutes the service was used during the night. Input Description: There are service code (s, S, p or P) and usage amount u (u≥0). If the service code is p or P, then the usage has two types; day usage du(du≥0) and night usage nu(nu≥0). Output Description: The format is RMt where t is the amount due in Malaysia currency format as shown in the sample output. Hint: Use the…In Python: The following equations estimate the calories burned when exercising (source): Women: Calories = ( (Age x 0.074) — (Weight x 0.05741) + (Heart Rate x 0.4472) — 20.4022 ) x Time / 4.184 Men: Calories = ( (Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) — 55.0969 ) x Time / 4.184 Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for women and men. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:print('Men: {:.2f} calories'.format(calories_man)) Ex: If the input is: 49 155 148 60 Then the output is: Women: 580.94 calories Men: 891.47 calories
- in java write a method to calculate the sum of all even digits in any given numberA primitive variable is passed from one method to another method by in Java. pass by value O pass by referenceWrite a Java program that sums a series of 10 numbers without duplicates. These numbers are supposed entered ordered by the user. The program will print at the end the computed sum and whether there are duplicates (in this case, print the number of duplicates) or not. Example 1: Number 1 = 1 Number 2 = 1 Number 3 = 2 Number 4 = 2 Number 5 = 2 Number 6 = 3 Number 7 = 4 Number 8 = 4 Number 9 = 4 Number 10 = 4 Sum = 10 The number of duplicates is: 6 Example 2: Number 1 = 10 Number 2 = 20 Number 3 = 30 Number 4 = 40 Number 5 = 50 Number 6 = 60 Number 7 = 70 Number 8 = 80 Number 9 = 90 Number 10 = 100 Sum = 550 No duplicate numbers were entered.