Question: Write a Java program: A car sales company requires a server to store(tread save all its car data (store car data on the server) and

Write a Java program:

A car sales company requires a server to store(tread save all its car data (store car data on the server) and share it with 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).

..

1) A salesperson can add a new car to the system (to the server) and read the requests.

2) Sell a car or/and request information from the system. Sample requests are: Cars for sale, Cars of a given make, and Total value of all sales. (could use arrayBlockingQueue, as it is concurrent already, or use locks)

3)No user intervention needed, just server/client(salesperson) need,

.

All cars added to the system should be stored in a thread-safe shared data structure on the server. You can create one client that performs all requests above, one after the other. No need for user intervention. 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.

#Java#Conncurrency#Sockets#SharedMemory#ParrallelStreams

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!