Hello, I have this assignment I'm supposed to deliver tomorrow, I have most of it figured out, but there are certain bits and parts of the question I can't figure out... I'll show you what I mean, here's the entire question:
Develop two linked lists to manage the list of students at the uni as follows: - ApplicantsList stores information about students that have applied to the uni and still waiting for acceptance. - StudentsList stores information about students at the uni . First of all, both lists are empty. An applicant is defined by the following information:FirstName, LastName, DateOfBirth, Status. The last variable status gives information whether the student is still on the waiting list or has been rejected/accepted A student is defined by the following information:FirstName, LastName, DateOfBirth, ID. 1- Start your program by adding 500 applicants to the list of ApplicantsList. It is your choice to add them at front or back. 2- Go through the ApplicantsList from beginning to end. For every applicant, you have to make one of the following decisions: a. Reject with a probability of 30%. In this case, the applicant should be deleted from the list ApplicantsList. b. Keep the student waiting with a probability of 30%. This means the status of the applicant should be set to Waiting. c. Accept with a probability of 40%. In this case, the applicant should join the StudentsList and be given a random ID. Attention: The StudentsList should be sorted in increasing order of ID. The applicant should be deleted from the ApplicantsList.
I most of the program figured out but my question is, HOW do I make the code to "make a decision" to reject by a certain probability? What I don't get is how I can make the program "reject with a probability of 30%" and so on... Any thoughts?