Welcome to the Legend of mir forums. Mir Revenge.
Results 1 to 3 of 3
  1. #1
    Spam Spam Spam Array
    Join Date
    Jan 2008
    Posts
    369

    Default any1 can help me make this simple java program plz?

    a java program that outputs the corresponding message according to the earthquake magnitude (M) on the Richter scale. [Graded]
    •M=1 to 3: “Not felt”
    •M=3 to 4: “Felt, no damage”
    •M=5: “Felt, slight damage”
    •M=6: “Medium damage”
    •M=7: “Serious damage”
    •M=8: “Great destruction”
    •M=9: “Rare great earthquake (Tsunami)”


    if any1 can do it for me on jcreator plz =/ i dunno hw 2 do
    ______________________________
    /Musoliny 101+ and rising
    /DOA 173+ and rising
    I LIE I CHEAT I STEAL

    Quote Originally Posted by Buddy View Post
    took me 30 ...k'in mins to update his items.. i was just checking forums before i go to bed ffs =(
    sum1 ban DOA for me please im off to bed

  2. #2
    Gilgamesh
    Guest

    Default Re: any1 can help me make this simple java program plz?

    Quote Originally Posted by Musoliny View Post
    a java program that outputs the corresponding message according to the earthquake magnitude (M) on the Richter scale. [Graded]
    •M=1 to 3: “Not felt”
    •M=3 to 4: “Felt, no damage”
    •M=5: “Felt, slight damage”
    •M=6: “Medium damage”
    •M=7: “Serious damage”
    •M=8: “Great destruction”
    •M=9: “Rare great earthquake (Tsunami)”


    if any1 can do it for me on jcreator plz =/ i dunno hw 2 do

    Earthquake.java

    01: /**
    02: A class that describes the effects of an earthquake.
    03: */
    04: public class Earthquake
    05: {
    06: /**
    07: Constructs an Earthquake object.
    08: @param magnitude the magnitude on the Richter scale
    09: */
    10: public Earthquake(double magnitude)
    11: {
    12: richter = magnitude;
    13: }
    14:
    15: /**
    16: Gets a description of the effect of the earthquake.
    17: @return the description of the effect
    18: */
    19: public String getDescription()
    20: {
    21: String r;
    22: if (richter >= 8.0)
    23: r = "Most structures fall";
    24: else if (richter >= 7.0)
    25: r = "Many buildings destroyed";
    26: else if (richter >= 6.0)
    27: r = "Many buildings considerably damaged, some collapse";
    28: else if (richter >= 4.5)
    29: r = "Damage to poorly constructed buildings";
    30: else if (richter >= 3.5)
    31: r = "Felt by many people, no destruction";
    32: else if (richter >= 0)
    33: r = "Generally not felt by people";
    34: else
    35: r = "Negative numbers are not valid";
    36: return r;
    37: }
    38:
    39: private double richter;
    40: }

    __________________________________________________ _____

    EarthquakeTester.java

    01: import java.util.Scanner;
    02:
    03: /**
    04: A class to test the Earthquake class.
    05: */
    06: public class EarthquakeTester
    07: {
    08: public static void main(String[] args)
    09: {
    10: Scanner in = new Scanner(System.in);
    11:
    12: System.out.print("Enter a magnitude on the Richter scale: ");
    13: double magnitude = in.nextDouble();
    14: Earthquake quake = new Earthquake(magnitude);
    15: System.out.println(quake.getDescription());
    16: }
    17: }
    ___________________________________

    Hope 'tis what you were searching for

    Live long & prosper

  3. #3
    Spam Spam Spam Array
    Join Date
    Jan 2008
    Posts
    369

    Default Re: any1 can help me make this simple java program plz?

    almost ye mate really appreciated
    ______________________________
    /Musoliny 101+ and rising
    /DOA 173+ and rising
    I LIE I CHEAT I STEAL

    Quote Originally Posted by Buddy View Post
    took me 30 ...k'in mins to update his items.. i was just checking forums before i go to bed ffs =(
    sum1 ban DOA for me please im off to bed


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Simple Changes to make Boss Killing worth it.
    By Erza in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 13
    Last Post: 17-05-09, 05:12 AM
  2. Can any1 tell me where exactly i can find Laughing Boy in game plz,Thank you!!
    By Tao in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 6
    Last Post: 05-08-08, 01:23 AM
  3. Replies: 14
    Last Post: 21-07-08, 08:24 AM
  4. Not Revenge related problem but a pc error - Can any1 help plz?
    By IceZircon in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 3
    Last Post: 31-03-08, 04:02 PM
  5. make this a poll plz
    By paintballer in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 22
    Last Post: 03-03-08, 01:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85