Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Network class: The Network class provides the infrastructure to allow the client and the server to process the transactions. The client and the server

image text in transcribed

- Network class: The Network class provides the infrastructure to allow the client and the server to process the transactions. The client and the server need to be connected (using connect()) to the network prior to an exchange. The Network class also implements an input buffer (inComingPacket[]) and an output buffer (outGoingPacket[]) to respectively receive transactions from the client and to return updated transactions to the client. The capacity of these buffers are 10 elements, so the network indicates whether they are full or empty. - Client class: The Client class reads all the transactions from a file (transaction.txt) and saves them in an array (transaction[]). A transaction is implemented by the Transactions.class. Using the send() method of Network class the client transfers the transactions to the network input buffer and it yields the cpu in case the network input buffer is full. Also, using the receive0 method of Network class the client retrieves the updated transactions from the network output buffer and yields the cpu in case the buffer is empty. Fach updated transaction received is displayed immediately on the streen. - Server class: The Server class reads all the accounts from a file (account.txt) and saves them in an array (account[]). An account is implemented by the Accounts class. Using the transferrln() method of Network class the server retrieves the transactions from the network input buffer and performs the operations (withdraw, deposit, query) on the specific accounts. It yields the epu in case the buffer is empty. Fach updated transaction is transmitted to the network output buffer using the transferOut() method of Network class and the server yields the epu in case the buffer is full. - Network class: The Network class provides the infrastructure to allow the client and the server to process the transactions. The client and the server need to be connected (using connect()) to the network prior to an exchange. The Network class also implements an input buffer (inComingPacket[]) and an output buffer (outGoingPacket[]) to respectively receive transactions from the client and to return updated transactions to the client. The capacity of these buffers are 10 elements, so the network indicates whether they are full or empty. - Client class: The Client class reads all the transactions from a file (transaction.txt) and saves them in an array (transaction[]). A transaction is implemented by the Transactions.class. Using the send() method of Network class the client transfers the transactions to the network input buffer and it yields the cpu in case the network input buffer is full. Also, using the receive0 method of Network class the client retrieves the updated transactions from the network output buffer and yields the cpu in case the buffer is empty. Fach updated transaction received is displayed immediately on the streen. - Server class: The Server class reads all the accounts from a file (account.txt) and saves them in an array (account[]). An account is implemented by the Accounts class. Using the transferrln() method of Network class the server retrieves the transactions from the network input buffer and performs the operations (withdraw, deposit, query) on the specific accounts. It yields the epu in case the buffer is empty. Fach updated transaction is transmitted to the network output buffer using the transferOut() method of Network class and the server yields the epu in case the buffer is full

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_2

Step: 3

blur-text-image_step3

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

ISBN: B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

Distinguish between poor and good positive and neutral messages.

Answered: 1 week ago

Question

Describe the four specific guidelines for using the direct plan.

Answered: 1 week ago