I have a project where I need to create a phone array. The array will create 100 phone numbers from 0000 to 0099.
After I have created the array, I need to simulate a telephone conversation between two randomly selected phones. If the phone being called to is in use, it will ring busy. This needs to similate an actual phone. When the phone is picked up, the boolean value of isBusy will be TRUE. The Conversation also needs to have a random call duration assigned using a Math.random command.
The following is the output.
Creating Phones... 0000 . . . 0099
Phone 0001 is calling Phone 0034 Conversation: Phone 0001 and Phone 0034 Conversation Lasted 4 Minutes Phone 0001 Hangs Up Phone 0034 Hangs Up