HELP PLEASE


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: HELP PLEASE

Hybrid View

  1. #1
    Robin Guest

    HELP PLEASE


    I have been struggling with JAVA for the past 2 months now and i can't seem
    to get it. Could anyone help me out with this problem:

    Write an application that uses two String arrays. The syntax is

    String[ ] emps = { "Bob", "Carol", "Ted", "Alice", "Mort", "Melba" };
    String[ ] jobs = { "Tinker", "Tailor", "Soldier", "Spy", "Artiste", "Geek"
    };

    The program requirements are

    1. The program iterates through the emps array and randomly
    assigns a job listed in the jobs array to each employee.

    (a) However, the ith employee cannot be assigned the ith job.
    For instance, Bob is the first employee and Tinker is the
    first job. Therefore, Bob cannot be assigned the Tinker job.


    (b) Each employee must be assigned a different job.

    2. The program prints to the standout output each employee and the
    randomly assigned job.

    3. The program prompts the user to

    (a) Exit the program.
    (b) Perform a new random assignment of employees to jobs.

    The program continues running until the user chooses to EXIT.
    Successive runs of the program should produce _different_
    assignments of jobs to employees, although eventually repeats
    are inevitable.

    If you could help me at all please e-mail me back ASAP
    Thanks So Much


  2. #2
    Guest

    Re: HELP PLEASE

    If you show some initiative and have a specific question, then you may get a
    more informative response...



    "Robin" <modinat17@hotmail.com> wrote in message
    news:3af048db$1@news.devx.com...
    >
    > I have been struggling with JAVA for the past 2 months now and i can't

    seem
    > to get it. Could anyone help me out with this problem:
    >
    > Write an application that uses two String arrays. The syntax is
    >
    > String[ ] emps = { "Bob", "Carol", "Ted", "Alice", "Mort", "Melba" };
    > String[ ] jobs = { "Tinker", "Tailor", "Soldier", "Spy", "Artiste",

    "Geek"
    > };
    >
    > The program requirements are
    >
    > 1. The program iterates through the emps array and randomly
    > assigns a job listed in the jobs array to each employee.
    >
    > (a) However, the ith employee cannot be assigned the ith job.
    > For instance, Bob is the first employee and Tinker is the
    > first job. Therefore, Bob cannot be assigned the Tinker

    job.
    >
    >
    > (b) Each employee must be assigned a different job.
    >
    > 2. The program prints to the standout output each employee and the
    > randomly assigned job.
    >
    > 3. The program prompts the user to
    >
    > (a) Exit the program.
    > (b) Perform a new random assignment of employees to jobs.
    >
    > The program continues running until the user chooses to EXIT.
    > Successive runs of the program should produce _different_
    > assignments of jobs to employees, although eventually repeats
    > are inevitable.
    >
    > If you could help me at all please e-mail me back ASAP
    > Thanks So Much
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center