How to write a pseudo-code for the program below.

Hi
Please help me write the algorithm for a program that stores data on 10 jobs and 10 workers. For each job the title and size are stored, for each worker the name and performance speed are stored. The program should display all the details and give a random allocation of jobs to the workers and for this allocation display the total time taken to do all the jobs.
Mayrie
Asked Apr 20, 2013
Make two column array of text boxes for the Job Information and two columns for workers and use the subscript for the box as the pointer to your data list. That way when you enter data in one of the text boxes, the subscript of that box will be the subscript in the list. Done that way, you can loop from one to 10 and manipulate it however you want.

For the random job assignment, look at the function for the Random Number Generator in your textbook. It will return a random ordered list of numbers from 1 to 10. Suppose the list is 6,2,8,9... Then loop through the workers and assign worker 1 job 6, worker 2 job 2, worker 3 job 8 etc.

To display total time you need to record the beginning time and ending time. You should have a Timer function that will return the number of seconds since midnight. Put buttons up for Start and End. Set a start variable to the timer when the button is clicked and an end variable when the end button is clicked. To determine the time, subtract the start from the end and divide as
Result (in hours) = (Difference / 60) / 60
Rob
Answered Apr 20, 2013
Thanks for your help.
Mayrie Apr 21, 2013

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.

Categories