Your task is to simulate of college and classrooms
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Your task is to simulate of college and classrooms

Your task is to simulate of college and classrooms:

There are four kinds of threads: students, visitors, monitor and a one Lecturer per classroom. students must wait to enter classroom if class is running, enter, and then sitDown. At some point, the Lecturer enters the classroom. When the Lecturer is in the classroom, no one may enter, and the students may not leave. visitors may leave. Once all students check in, the Lecturer can StartLecture. After some time, the Lecturer leaves and all students can leave.

• students must invoke enter, sitDown, and leave.

• The Lecturer invokes enter, startLecture and leave.

• visitors invoke enter, sitDown and leave.

• While the Lecturer is in the classroom, no one may enter and students may not leave.

• The Lecturer cannot startLecture until all students who have entered have also sitDown.

• At any point of time any classroom may have only one lecturer.

• Classroom capacity should not exceed limit. Visitors are always low in count (less than 5).

• Add a monitor thread to keep printing the status of each class as follows

Simulate a college with few classrooms

{W201 (capacity 60), W202(capacity 60), W101 (Capacity 20), JS101 Capacity (30)} and

lecturers {Osama, Barry, Faheem, Alex, Aqeel, Waseem} that circulate between classes.

Hints: Lecturer can use a binary semaphore to access classroom so one lecturer in class at any time students and visitors can use counted semaphores to access classroom. You can use locks, barriers, semaphores.


Hint
ManagementComputer-relative classroom simulations are firmly considered as a promising means of practicing PSTs’ (preservice teachers’) interpersonal competence so as to ease the gap between educational practice and teacher education. Varied reviews map together learning experiences, hindrances of simulations, and affordances. ...

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.