Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Concurrency 11 The University of Jordan has three main gates. For security reasons, management requires to keep a current count of all individuals who are

image text in transcribed

Concurrency 11 The University of Jordan has three main gates. For security reasons, management requires to keep a current count of all individuals who are inside the campus. Each gate has a counting machine based on a card-swipe machine for entry and another for exit. 1. Write a Counter class that holds a count for all individuals in the university campus. 2. Write an Entry class representing an entrance with a card-swipe machine that increments the counter when a student passes through the entrance. 3. Write an Exit class representing an exit with a card-swipe machine that decrements the counter when a student leave through the exit door. 4. Write a test program TestCount to test three gates each fitted with one entrance and one exit threads. A gate is an object you should write and instantiate for each University physical university gate (gates needn't be threads). In your solution, synchronize parts of your program to avoid effects of interleaving and memory inconsistencies. Furthermore, use Git to document your progress

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

Identify the types of informal reports.

Answered: 1 week ago

Question

=+2 How does the preparation and support for each type of IE vary?

Answered: 1 week ago