|
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks