Question

java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you...

java programming:

Convert the following PSEUDOCODE into a java program. For this problem I'm giving you the pseudocode and you are writing the program, in later problems you will write both the pseudocode and the java program. This means pseudocode is NOT required for this program.

Pseudocode to convert to a java program:
Create variables: force, area, and pressure
Store 172.5 in the variable force
Store 27.5 in the variable area
Divide force by area and store the result in the variable pressure
Display: The pressure is 6.2727272727272725. on the screen.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.util.Scanner;

public class Pressure {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("Enter force: ");
        double force = in.nextDouble();
        System.out.print("Enter area: ");
        double area = in.nextDouble();
        System.out.println("The pressure is " + (force / area));
        in.close();
    }
}
Add a comment
Know the answer?
Add Answer to:
java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you...

    java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you the pseudocode and you are writing the program, in later problems you will write both the pseudocode and the java program. This means for this program pseudocode is NOT required. Pseudocode to convert to a java program: Create variables: speed, time and distance Store 20 in the variable speed Store 10 in the variable time Multiply speed * time and store the result in...

  • java programming Problem 2) Convert Kilometers to Miles Write a JavaFX program using JavaFX Menu for...

    java programming Problem 2) Convert Kilometers to Miles Write a JavaFX program using JavaFX Menu for to solve the following problem about converting between Kilometers to Miles. Sample Run is shown below You are asked to implement only the menu item under Formulas which reads as"KM to Mile". Choosing this menu item will display the following input box: Input Enter Kilometers Value OK Cancel The result will be displayed in a TextArea as shown below: JavaF× Menu Example " File...

  • Convert the following pseudocode to Java. Use the same variable names as those in the pseudocode....

    Convert the following pseudocode to Java. Use the same variable names as those in the pseudocode. You may assume that the incoming array contains int values and that a swap method exists elsewhere. The variables low and high represent indices in the array. In a comment before the sort method, list which sorting algorithm is used here and what its runtime complexity is in Big-O notation. This is the only comment required for this code. SUBROUTINE sort(ARRAY a[0..n], low, high)...

  • I'm trying to construct this program in C#, I found some similiar problems in Java but...

    I'm trying to construct this program in C#, I found some similiar problems in Java but as a beginner, its not very easy to follow along with the Java code. Create a Console application named RelativesApp to help you remember your relatives’ birthdays. ·Create a Relative class that includes auto-implemented properties for the relative's name, their relationship to you, and two integers to represent their birthday –month, day. ·Declare an array of at least 12 relative objects. ·Fill the array...

  • In Java Problem Description/Purpose:  Write a program that will compute and display the final score...

    In Java Problem Description/Purpose:  Write a program that will compute and display the final score of two teams in a baseball game. The number of innings in a baseball game is 9.    Your program should read the name of the teams. While the user does not enter the word done for the first team name, your program should read the second team name and then read the number of runs for each Inning for each team, calculate the...

  • guys can you please help me to to write a pseudo code for this program and...

    guys can you please help me to to write a pseudo code for this program and write the code of the program in visual studio in.cpp. compile the program and run and take screenshot of the output and upload it. please help is really appreciated. UTF-8"CPP Instruction SU2019 LA X 119SU-COSC-1436- C Get Homework Help With Che X Facebook -1.amazonaws.com/blackboard.learn.xythos.prod/584b1d8497c84/98796290? response-content-dis 100% School of Engineering and Technology COSC1436-LAB1 Note: in the instruction of the lab change "yourLastName" to your last...

  • Program with generic merge sort and binary search method help. The programming language I'm using is...

    Program with generic merge sort and binary search method help. The programming language I'm using is Java. This program should show understanding generic merge sort methods and generic binary search methods in java. The execution should include at least 5 found items including one from the first three items in the sorted array and one from the last three items in the sorted array as well as at least two items not found Create a generic merge sort method that...

  • C Programming Complete the following function by writing C statements that correspond to the description in...

    C Programming Complete the following function by writing C statements that correspond to the description in each comment in the code.             #include <stdio.h> intmain() { // Declare a floating point variable to store a rectangle’s width // Declare a floating point variable to store a rectangle’s length // Declare a third floating point variable that will store the area of the rectangle. // Prompt the user to enter a width for the rectangle. // Get the user’s input, and store...

  • Write a Java program to do the following with your name. This can all be done...

    Write a Java program to do the following with your name. This can all be done in the main() method. 1. Create a String variable called myName and assign your personal name to it. Use proper capitalization for a legal name. I.e. String myName = "Billy Bob"; 2. Load myName with the upper case version of itself and display the result. 3. Load myName with the lower case version of itself and display the result. 4. Capitalize the first letter...

  • Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As...

    Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As the family cook, you know that the toughest question of the day is "What's for dinner?" You For decide to write a program to help you do days of meal planning for the entree, side and dessert. You will need to use random numbers and functions to complete the project. What's Dinner? • • • Start with a pseudocode (10 points). Write the pseudocode...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT