1.

Solve : nid help?

Answer»

This part of the question requires you to complete the coding of a client–
server system that simulates an online international banking application. The
customers of the bank can select their preferred language for communication
with a bank server in order to obtain a report on their account’s BALANCE.

We have provided TWO NetBeans projects (in the file TMA02Q1.zip) for this
question: BankingServer and BankingClient. The code consists of
the following classes.

! The server, which runs indefinitely, is called
InternationalServer. It waits for a client to connect, and then
creates a thread (an instance of a class called
InternationalSession, see below) which controls this client’s
session.

! An InternationalAccount class, which has methods that
implement dialogues in different languages. It also has a dummy value
for the balance of an account.

! An InternationalSession class. An object of this class controls a
session, and invokes the methods of an InternationalAccount
object. The run method of this class first invokes the method that
requests the client to choose one of the following four languages:
English, DUTCH, Italian and Portuguese. It then executes the method
which asks (in the appropriate language) for the client’s account number,
and then reports the current balance of this account. (Note that, in the
InternationalAccount class, the problem has been simplified by
supplying a single dummy value for the balance, so that all accounts have
the same balance.)

! A client, called InternationalClient, which connects to the
InternationalServer server. It provides input for the class
InternationalSession, reads the messages it receives back, and
prints these messages on the screen.
Carry out the following steps.

1 Open the projects and inspect the code.
2 Write the code for the class InternationalServer which should do
the following:
! Wait to make a connection with each client at a port with an
appropriate port number outputting a message to the screen saying that
it is waiting for a client.
! Once a client is CONNECTED, create a thread (using the class
InternationalSession), provide it with the correct input and
output streams, and set the thread running.
3 Complete the class
4 Run the server.
5 Run four clients, one in each language.
4
Include the NetBeans projects in your Solutions zip and copy the following
items to your Solution Document.
(i) A copy of the code for your InternationalServer class.
(ii) The code for the completed statements for class
InternationalClient (note that there is no need to supply the code
for the whole class).
(iii)A SCREENSHOT of NetBeans with the Output window visible showing that
the server is running and waiting for a client.
(iv) A screenshot of NetBeans with the Output window visible showing a
client’s dialogue in Dutch.
Then answer the following question:
(v) In class InternationalClient there are readLine statements
associated with two different BufferedReaders on the lines marked
//1 and //2. By tracing through the code, explain for each readLine
statement where the data being read originates fromIs this a school assignment?Quote from: mroilfield on November 22, 2009, 04:56:00 AM

Is this a school assignment?

I think you win a prize, I wonder what Patio and BC are giving away today.

I love it when people think we will do the homework for them. Isn't that what studying is for?Quote from: Quantos on November 22, 2009, 05:07:18 AM
I think you win a prize, I wonder what Patio and BC are giving away today.

I love it when people think we will do the homework for them. Isn't that what studying is for?

I like prizes, however I have never liked doing home work. Quote from: mroilfield on November 22, 2009, 04:56:00 AM
Is this a school assignment?

yes...I hate to tell you this Ub, but you are barking up the wrong tree.

We don't do homework here, we did enough of our own earlier in life.

We would help you find resources, however I'm pretty sure that there may be something in your texts or notes that points to these solutions.Quote from: Quantos on November 23, 2009, 04:15:21 AM
I hate to tell you this Ub, but you are barking up the wrong tree.

We don't do homework here, we did enough of our own earlier in life.

We would help you find resources, however I'm pretty sure that there may be something in your texts or notes that points to these solutions.

Very well put.Quote from: mroilfield on November 23, 2009, 05:01:51 AM
Very well put.

Thank you.


Discussion

No Comment Found