Question: SHOULD WORK IN UBUTUN LINUX In this assignment, you will be tasked with implementing a simplified Bank Call Center 5 ystem for the server and
SHOULD WORK IN UBUTUN LINUX
In this assignment, you will be tasked with implementing a simplified Bank Call Center ystem for
the server and client using C programming language. The system will consist of two program : a
server program and a client program, which will communicate via shared memory. The server
program will create a shared memory segment to store a choice entered by the user, prompt the
user to enter an integer number representing a menu choice, and print a message acknowledging
the call. The client program will access the shared memory segment created by the server,
retrieve the value stored in the shared memory, and print a corresponding message based on the
retrieved value. Your task is to implement both the server and client programs according to the
specifications provided below:
Server Program serverpp:
Create a shared memory segment using the shmget function.
Attach the shared memory segment to the server's address space using the shmat
function.
Prompt the user to enter an integer number or representing a menu choice.
Store the entered choi ce in the shared memory segment.
Print the message: "Call center server: Thank you for calling the bank center."
Client Program client :
Access the shared memory segment created by the server using the shmget function.
Attach the shared memory segment to the client's address space using the shmat function.
Read the value stored in the shared memory segment.
Print a message based on the value retrieved from the shared memory:
If the value is print: "Call center client: Inquire about your accounts."
If the value is print: "Call center client: Customer support to report loststolen
cards."
If the value is print: "Call center client: You can speak to one of our agents who
will help you with any of your queries."
Detach the shared memory segment using the shmut function.
Mark the shared memory segment for destruction using the shm tt function.
Sample Inputoutput:
Enter an integer number
Call center server: Thank you for calling the bank center
C all center client: Customer support to report loststolen car ds
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
