Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For example in client code Import socket # library s= socket.socket(socket.AF_INET, socket.sock_STREAM) # to apply tcp connection Host =socket.gethostname() Port= 12345 size = 1024 s.connect((host,port))

For example in client code
Import socket # library
s= socket.socket(socket.AF_INET, socket.sock_STREAM) # to apply tcp connection
Host =socket.gethostname()
Port= 12345
size = 1024
s.connect((host,port))
Data = s.recv(size)
and then continue by writing the rest of client code
The server code start with
Import socket
s= socket.socket(socket.AF_INET, socket.sock_STREAM) # to apply tcp connection
Host =socket.gethostname()
Port= 12345
s.bind((host,port))
s.listen (5)
#declare the inputs
Card number = 22222
Pin-code = 1968
Balance = 5000
#Then write the rest of the code as the requirements needed
# using python
image text in transcribed
#write code for the server #write code for the client the Card number = 1000987 password number = 2222 then check password correct or not thrn appy transcation processs # code must must use so socket library (import socket) #tcp connection # python language please consider an ATM machine system represent (client) and server that has clients account is the bank. the server can accept multiple client (ATM machine) one at time, so will use in the code TCP connection the client must provide his card number and password first to the system .the system can send message to client if wrong password wrong any transcation process occur ,so the following item is needed : write a code that use socket programming using (python) between client and server shows the card number and password and the transcation process 1-balance 2- withdrawl 3- deposit 4- exit using TCP connection # server code and client code #using python # tcp connection

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions