A car sales company requires a server to store all its car data and share it between its sales… 1 answer below »

Please complete the problem described below. This assignment forms part of the assessment for this
module and you are required to upload your solution on Moodle. This assignment counts for 25%
of the marks for this course. You must include as header your name and student number.
A car sales company requires a server to store all its car data and share it between its sales personnel.
For the purposes of this assignment each car has the following attributes: registration, make, price,
mileage and forSale (use a boolean- true for forSale and false for sold). Clients can do the following:
-A sales person can add a new car to the system.
-Sell a car or request information from the system.
Sample requests would be cars for sale, cars of a given make, total value of all sales.
All cars added to the system should be stored in a shared data structure on the server.
Your task is to build a working model of this system.
Notes
1. No log on/off required for users.
2. For this assignment you should add approximately 15 cars to the system.
3. Server should use thread pool and semaphores to limit users to 50
4. All requests to server must be objects
5. Cars added on server must be thread safe as many clients have conflicting requests

Don't use plagiarized sources. Get Your Custom Essay on
A car sales company requires a server to store all its car data and share it between its sales… 1 answer below »
Just from $13/Page
Order Essay

Document Preview:

Concurrent Programming
CPP
Assignment 2, Due May-5-2019

Please complete the problem described below. This assignment forms part of the assessment for this
module and you are required to upload your solution on Moodle. This assignment counts for 25%
of the marks for this course. You must include as header your name and student number.

A car sales company requires a server to store all its car data and share it between its sales personnel.
For the purposes of this assignment each car has the following attributes: registration, make, price,
mileage and forSale (use a boolean- true for forSale and false for sold). Clients can do the following:
-A sales person can add a new car to the system.
-Sell a car or request information from the system.
Sample requests would be cars for sale, cars of a given make, total value of all sales.

All cars added to the system should be stored in a shared data structure on the server.

Your task is to build a working model of this system.

Notes
1. No log on/off required for users.
2. For this assignment you should add approximately 15 cars to the system.
3. Server should use thread pool and semaphores to limit users to 50
4. All requests to server must be objects
5. Cars added on server must be thread safe as many clients have conflicting requests

Attachments: