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 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 the variable distance
Display The distance is 200.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER: Here I am giving you the code and output please like it.

CODE:

public class Main {


public static void main(String[] args) {

   int distance, speed , time;
   speed=20;
   time=10;
   distance=speed*time;
   System.out.println("The distance is "+distance+".");
     
}}

OUTPUT:

The distance is 200.

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 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...

  • 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...

  • Write a Java pseudocode for a 2-dice game. This game will roll the two dice together...

    Write a Java pseudocode for a 2-dice game. This game will roll the two dice together for 100 times. In each time, it will display the face values from both dice. The program will count how many times (out of these 100 attempts) did the two dice generate a total point of 10 or above, and display the result at the end. In a word document, PPT file or a PDF 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...

  • JAVA CODE Write a JAVA program to do the following. Input an integer x. (Should work...

    JAVA CODE Write a JAVA program to do the following. Input an integer x. (Should work with “big” numbers.) Create a completely-skewed BST S containing 1, 2, . . . , x. Create a BST R containing x integers without repetitions gen- erated at random. (To minimize the risk of repetitions, you can multiply the value returned by random() by a big number.) Given that the numbers are generated uniformly at random, the tree will likely be balanced. Measure the...

  • Java Programming Reading from a Text File Write a Java program that will use an object...

    Java Programming Reading from a Text File Write a Java program that will use an object of the Scanner class to read employee payroll data from a text file The Text file payroll.dat has the following: 100 Washington Marx Jung Darwin George 40 200 300 400 Kar Car Charles 50 22.532 15 30 The order of the data and its types stored in the file are as follows: Data EmployeelD Last name FirstName HoursWorked double HourlyRate Data Tvpe String String...

  • 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...

  • 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...

  • Write a program for the management of a bookstore in Java Programming Language, WITHOUT THE USE...

    Write a program for the management of a bookstore in Java Programming Language, WITHOUT THE USE OF STUFF RELATING TO OBJECTS AND WHAT NOT, just arrays, strings, loops, etc. I'm in an intro to programming class so I haven't learned those techniques and am not allowed to use them. The books we just create Overview; Opening menu 1. List all books 2. Search all books 3. Purchase books 4. Exit If option 1 is chosen: List all books by Title,...

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