Please help is any way you can.

Hi. I am getting so sick of this program. I have been trying to do it for the past couple of weeks and I am getting nowhere. I really wish someone can help me on it ... like totaly help me on it. I am getting so frustrated. I would appreciate all the help.
This is the program:
In Belageusia, a plorg has these properties:
Data:
     A plorg has a name
     A plorg has a contentment index (CI), which is an integer between 0 and 100
The population of plorgs in Belagersia is further subdivided into three mutually exclusive classes: Plebeians, Equidians, and Elitians.
A Plorg?s stature is completely determined by their contentment index and witht that designation comes certain burdens and/or advantages.
Plebeians have a contentment index in [0, 24].
Each new Plebeian is welcomed with a contentment index of 2 and burdened with a debt of $10.00
Plebeians never manage to break even, so they have no taxes imposed upon them. Furthermore, since they can never get out debt, they cannot accumulate any wealth.
Equidians have a contentment index in [25, 75]
Each new Equidian is welcomed with a contentment index of 50 and burdened with taxes of $20.00
Equidians have taxes imposed upon them. Furthermore, since they do manage to break even, they have no debt. However, since they only manager to break even, they do not accumulate any wealth.
Elitians have a contentment index in [76, 100]
Each new Elitian is welcomed with a contentment index of 87 and burdened with taxes of $20.00, but also provided with a ?silver spoon? of $30.00 in accumulated wealth.
Elitians manage to expand upon their wealth, sot hey have taxes imposed upon them. Furthermore, since they are accumulating wealth, they have no debt.
At each interim time epoch the population of Belageusia retracts with a death rate randomly selected between 0% and 10%. If a plorg survives the purge, they have an opportunity to move one class higher and/or one class lower. However, remember that a plorg?s name is final. It never changes.
For Plebeians this is transition is determined by randomly selecting a CI in [0, 49]. If this new CI is les than 25 then the plorg remains a Plebeian, with this newly assigned CI, and their debt increases 3.7%. If this new CI is in [25, 49], the Plebeian ascends to a Equidian, with this newly assigned CI, their debt is forgiven, but taxes of $20 are assessed.
For Equidians this is determined by randomly selecting a CI in [0,100].
If this new CI is in [25, 75] then the plorg remains a Equidian, with this newly assigned CI, but their taxes are increased 6.1%.
If this new CI is in [0, 24] then the plorg becomes a Plebeian, with this newly assigned CI, their taxes are forgiven, but they are burdened with a debt of $10.00.
If this new CI is in [76, 100] then the plorg becomes a Plebeian, with this newly assigned CI, but their taxes are increased 6.1%. However, they are bewtowed a wealth of $30.00.
For Eletians this is determined by randomly selecting a CI in [51, 100]. If this new CI is greater than 76 then the plorg remains an Eletian, with this newly assigned CI, their taxes increase 6.1% and their wealth increases 4.9%. If this new CI is in [51, 75], then this plorg becomes an Equidian, with this newly assigned CI, their wealth is eliminated, and their taxes are increased 6.1%.
At each time epoch, the population of Belageusia at a birth rate randomly selected between 0% and 10%. A randomly chosen number between 0-100 determines each newly born plorg?s stature. If this random number is in the range 0-24, create a new Plebeian. In the range 25-75, create a new Equidian, and if in the range 76-100, create a new Elitian.
We are supposed to output the population characteristics of Belageusia, after 1000 time epochs.
This is the code that I wrote down but got no where with:
import javax.swing.*;
import java.util.*;
import java.text.*;
public class Belageusiaplorg
     public static void main (String[] args)
          ArrayList Plebs = new ArrayList(350);
          ArrayList Equids = new ArrayList(600);
          ArrayList Elits = new ArrayList(350);
          ArrayList Holding = new ArrayList(600);
          for (int i=0; i<25; i++)
               Plebs.add(new plebian());
          for (int i=0; i<50; i++)
               Equids.add(new equidian());
          for (int i=0; i<25; i++)
               Elits.add(new Elitian());
          long population = Plebs.size() + Equids..size() + Elits.size();
          System.out.println("Current Belageusia Population is "+population);
          System.out.println("Current Plebeians Population is "+Plebs.size);
          System.out.println("Current Equidians Population is "+Equids.size);
          System.out.println("Current Elitians Population is "+Elits.size);
          Random generator = new Random();
          int x = generator.nextInt(11);
          for (int j=0; j=plebs.size(); j++)
               System.out.println(Plebs.g(j));
          long Equids_size = Equids.size();
          long Elits_size = Elits.size();
          for(int j=1; j<Plebs.size(); j++)
               Plebian e = (Plebian) Plebs.get(j);
               int new_ci = generator.nextInt(50);
               if (new_ci < 25)
                    e.setCI(new_ci);
                    e.raiseDebt();
               else
                    Plebs.rename(j);
                    Equids.add(new Equidian(e.getName().newCI));
                    j++;
          for(int j=0; j < Equids.size; j++)
               Equidian e = (Equidian) Equids.get(j);
               int newCI = generator.nextInt(101);
               if(new_ci < 25)
                    Equids.remove(j);
                    Plebs.add(nwe Plebian(e.getName().new_ci));
                    Equids_size --;
                    j++;
               else
               if (new_ci > 75)
                    Equids.remove(j);
                    Elitian f = new Elitian(e.getName(),new_ci,e.getTaxes());
                    Elits.add(f);
                    Equids_size --;
                    j--;
               else
                    e.setCI(new_CI);
                    e.raiseTaxes();
          for (int j=0; j<Elits.size; j++)
               Elitian e = (Elitian) Elits.get(j);
               int ci = e.getCI();
               int r = generator.nextINT(50);
               int new_ci = 51+r;
               if(new_ci > 75)
                    e.setCI(new_ci);
                    e.raisetaxes();
                    e.raisewealth();
               else
                    Elitians.remove(j);
                    Equidian g = new Equidian(e.getName(), new_ci);
                    g.raisetaxes();
                    Equids.add(g);
                    Elits_size --;
                    j--;
          if(deathrate != 0)
               int multiple = 100/deathrate;
               int count 1;
               for (int j=0; j=Plebs.size(); j++)
                    if(count % multiple == 0)
                         Plebs.remove(j);
                         j--;
                    count++;
class Plorg
     private final String name;
     private int CI;
     private static long nextID = 1;
     public Plorg()
          name = "Plorg" + nextID;
          nextID++;
     public Plorg(int CI)
          name = "Plorg" + nextID;
          nextID++;
          this.CI = CI;
     public Plorg (String name, int CI)
          this.name = name;
          this.CI = CI;
     public void setCI(int new_CI)
          CI = new_CI;
     public String getName()
          return name;
     public int getCI()
          return CI;
     public Plorg Plebs()
     public Plorg Equids()
     public Plorg Elits()

The only person who can clarify your homework requirements is the professor who assigned it.

Similar Messages

  • My ipod touch 4th gen was stolen please is there any way you can find it with out find my iphone?

    My ipod touch was stolen on the a public bus on tuseday !! there was 3 people across from me and were looking at me while i had it i have them as name of suspects and on the bus there was cctv footage so i went to the police to look at it and they yet havent got back yet and so i went on to find my iphone and i used this before and it found my ipod when i last used it in december or early jan but when i tryed to use it this time it said offline .. so i contacted apple they said keep trying it soo i have but nothing changing and im getting more upset with out it everyday and i just got it x mas time.. if there is anyway else you can track it please please tell me !!!! i would much appriciate it xx
                                                                                                                LaurenH7604
    Ps this is the type of ipod touch

    Call the cops!
    Allan

  • I dropped my iPhone 4 in water and now it won't turn on at all, will i lose all of my data, for example my photos and messages etc? and is there any way you can back the phone up without having it switched on?

    I dropped my iPhone 4 in water and now it won't turn on at all, will i lose all of my data, for example my photos and messages etc? and is there any way you can back the phone up without having it switched on?

    If you had previously been backing up to iCloud (or a computer with iTunes), you would possibly have a backup.  That said, if you can't turn the phone on, you cannot create a backup of the device now.  Sorry.

  • Is there any way you can deautherized 5 computers more than once a year?

    Is there any way you can deautherized 5 computers more than once a year?

    Click "Support" at the top of this page, then click the link under "Contact Us"

  • I have just signed upfor family sharing. Is there any way you can get the same app on two devices but not have to share it? My sons both want clash of clans but they don't want to be on the same village and they can't both be on app at the same time?

    I have just signed up for family sharing. Is there any way you can get the same app on two devices but not have to share it? My sons both want clash of clans but they don't want to be on the same village and they can't both be on app at the same time?

    hi, the app is not "shared", it works as if you bought the app twice with different accounts, only you paid it once. they should have 2 different villages since they're on 2 different devices.

  • HT3529 is their any way you can add timestamps to youre SMS and imessages?

    is their any way you can add timestamps to youre SMS and imessages?

    add time stamps, no.
    view time stamps, yes. (swipe a message from right to left to show the hidden time stamps)

  • Is there any way you can locate my phone, it has been stolen

    Is there any way you can locate my phone, it has been stolen.

    Did you have FindMyPhone turned on in iCloud? If not report the loss to police, there is nothing Apple can do.
    Sorry
    Pete

  • Is there any way you can block wifi use on 4s

    Is there any way you can block wifi use on 4s

    If you mean you want to set a restriction code for WiFi there isn't a way to do that.

  • Is there any way you can stop itunes duplicating visible albums

    I back up my phone few time and taken every thing off and reload it?
    for some reason itunes keeps duplicating visible albums and i can't get rid of them?
    Also i mix one my albums up and won't let me get rid of album with 4songs in?
    Please help?
    thanks

    You can buy an application called Tune up Media and it will delete any dupicates and will organize your music the way you want it. It costs like $20 Hope that helps.

  • I forgot my security questions, any way you can look them up on your records?

    It is my first purchase on this device and it says I need to answer questions, I forgot my answers because ive been using my iPad and didn't have a problem. Please Help!!!

    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a valid rescue email address, then use this procedure:
             Rescue email address and how to reset Apple ID security questions.
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
         4. Account security issues almost always require you to speak directly to an
             Apple representative to securely establish your identity as the account holder.
             You can set it up so that Apple calls you, either immediately or at a time
             convenient to you.
                1. Go to www.apple.com/support.
                2. Choose Contact Support and click Contact Us.
                3. Choose Other Apple ID Topics and choose the appropriate topic for
                    your issue.
                4. Follow the onscreen instructions.
             Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                            Apple ID- All about Apple ID security questions.

  • HT5176 Is there any way you can remove the little microphone on the keyboard but still have Siri on?

    I never use it to dictate my text messages or any other thing I need typed so it just gets in the way please help.

    sberman wrote:
    No.  If Siri is on, then dictation is on.
    Not so. Dictation has its own on/off under Settings/General/Keyboard. Siri's is Settings/General/Siri.

  • HT1766 Is there any way you can recover photos easily and for free?

    I really need help, i accidently deleted important photos on my ipod &amp; i really want them back immediately! :'( Please help me!

    - If they are in an iPod backup then restore from that backup. See the restore topic of:
    iOS: How to back up
    - If they are in the iTunes backup then get them from the backup by:
    Recover iPhone, iPad or iPod photos from backups with Picturescue
    - If you used PhotoStream then try getting them from your PhotoStream. See that topic of:
    iOS: Importing personal photos and videos from iOS devices to your computer
    I know of no cheap way of getting them, even if possible, from the iPod

  • Hi when I use USB cable to transfer photos from my computer to my I pad2 when I have one lot of photos on I pad when I come to put more on I loose the first ones, is there any way you can save photos to I pad

    Hi when I transfer photos from my computer to my I pad2' that's ok but when I come to transfer more photos I loose the first ones
    Is there a way I can save them
    Hope somebody out there could let me know
    Many Thanks

    Only the contents of the most recent sync remain on the iPad, so if you want to sync multiple folders then you need to sync them in one go - in which case the folders will need to be directly off the same parent folder (otherwise they can't all be selected). Not including a folder in a subsequent sync is the way by which you delete them off the iPad. More info on photo syncing http://support.apple.com/kb/HT4236

  • Is there any way you can reset your iPod password online instead of connecting it to a computer?

    Can you help me reset my pass code online?

    If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone and use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    You can also wipe the iOS device by installing the FindMyiPhone app on another iOS device and using that app to wipe the device.

  • HT1296 Is there any way you can down load music from your computer to your iphone without going through itunes

    can you down load music to your iphone 3gs from your lap top with out going through itunes ?

    Called iTunes Match:
    http://www.apple.com/itunes/itunes-match/
    iTunes purchased content you can download to your phone antime you wish, match not required.

Maybe you are looking for

  • HT1146 I have a NEW e-mail provider. I must CHANGE this on my Apple & iTunes account - need HELP !

    I haved moved after 38 years in the same place. I have changed e-mail addresses and cannot seem to get Apple to leave my OLD address alone. In trying to fix this, I have changed my password several times, and am now having a really bad time even gett

  • Cannot open itunes in windows 7, tried everything, hav 64 bit , new pc

    Cannot open itunes in windows 7, hav new pc with window 7 64 bit but have not been able to open itunes after downloading in numerous times and ways. Consulted various but still won't open , icon appears but nothing esle. Need help,been tryin for mont

  • HD TV Show... can't get Dolby Digital 5.1 to Work

    I just bought an episode of Chuck (from NBC). In the description of the show it says that it has Dolby Digital 5.1 Surround Sound. I have my macbook-pro hooked up to my surround sound system using a mini-toslink -> optical connector. When playing the

  • SOAP REC ADAPTER PROBLEM

    Hi Experts, we are receiving following message from SOAP receiver adapter. Can anyone asisst me?  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Inbound Message   --> - <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi

  • Download tv shows very choppy video

    I have a PC with a 2.40ghz cpu and 512mb ram and a ATI 9250 video card. When I download tv shows to itunes 7.0.2 It seems that the CPU load goes up to 100% and stays there. The video pauses and stops completely sometimes due to the CPU maxed out!! Ho