Recent content by obeying

  1. O

    Java How can I efficiently replace common text message abbreviations in Java?

    Hi everyone, I've been working on this assignment for a few days now with no luck at all. Would anyone be willing to review this code for me and see if I'm even setting it up right? Here are the directions for the assignment. 1) Use scnr.nextLine(); to get a line of user input into a string...
  2. O

    Java Finding Tree Height Using Simple Geometry and Java Coding

    Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula: tan(angleElevation) = treeHeight / shadowLength. Given the shadow length and angle of elevation, compute the tree height. What I have so far: import java.util.Scanner...
  3. O

    Java Reading and printing a string in Java - Assigning values

    Thanks! This is the solution I achieved after applying the correct code/nextInt.
  4. O

    Java Reading and printing a string in Java - Assigning values

    A user types a word and a number on a single line. Read them into the provided variables. Then print: word_number. End with newline. Example output if user entered: Amy 5 Result should read as: Amy_5 import java.util.Scanner; public class SpaceReplace { public static void main (String []...
  5. O

    Java Acceleration of Gravity in Java

    It worked! Thank you so much, I can't believe I was that close to getting it.
  6. O

    Java Acceleration of Gravity in Java

    Okay, so I set it up wrong all together?
  7. O

    Java Acceleration of Gravity in Java

    Compute the acceleration of gravity for a given distance from the Earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the Earth 5.98 x 1024 (in...
Back
Top