473,486 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

client-server application

1 New Member
i am new to the JAVA...Any one help to make codes for this server client application program
"Design and implement a server application which acts as an Internet bank, i.e. keeps track of bank accounts and allows clients to connect over the Internet and make deposits and withdrawals from any of the bank accounts. Also implement the client application. Use any port number available for general use, i.e. in the range 50000 through 65535"
Functional specification of the client and server
1. Upon launch, the client should prompt the user for the hostname of the computer runningthe server.
2. The client should then ask the user for account number and amount of money to be deposited or withdrawn from the account. A negative amount corresponds to a withdrawal and a positive to a deposit.
3. When receiving a request, the server should check if the transaction can be made. There are two requirements:
(a) The account number must be valid.
(b) For withdrawals, the account balance prior to the transaction must be equal to or larger than the amount withdrawn to prevent a negative balance.
(c) To prevent fraud, an account may not be updated more frequently than once
every 60 seconds.
The client should inform the user with a message whether the transaction was successful or not and, if it was, print the current account balance after the transaction. An invalid account number should result in a message that the transaction was unsuccessful, and should not cause an exception at the server.
4. For debugging purposes, the server should print nicely the status of all ten accounts on screen after each transaction.
5. Finally, the client should ask the user if she wants to make another transaction or not. If not, a signal should be sent to the server to terminate the connection and the client should exit.
other information.
2. The applications should communicate through TCP.
3. The server must be able to handle several clients simultaneously. In Java, this is easiest done by making the server multithreaded.
Jan 28 '07 #1
1 1947
horace1
1,510 Recognized Expert Top Contributor
break the problem down into a number of steps
(1) implement and test a class to hold a single account and do transactions on it, e.g. create and account, make a deposit, print an accout, etc - both the client and server will need this
(2) implement a class to hold a number of bank accounts and process them, e.g. in an ArrayList? the server will nee this.
(3) implement the client/server initially with a single thread -
(3) then multithread the server to deal with multiple clients

the following discess TCP/IP clients and server mainly from a C point of view but also with java examples
http://sage.mc.yu.edu/kbeen/teaching/networking/resources/sockets.html
Jan 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2288
by: Chris | last post by:
<apologies for cross-posting> Hi All, I am based in the UK and have been doing some private work for a client which involved setting up a database and scripts to search it and display results...
1
5161
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly...
2
4643
by: Rhino | last post by:
I am trying to verify that I correctly understand something I saw in the DB2 Information Center. I am running DB2 Personal Edition V8.2.1 on Windows. I came across the following in the Info...
5
2189
by: Paul H | last post by:
How do you folks get a reliable and complete brief of what is required before development starts? I am forever going back to a client once a project has started saying "Hang on, now that I've...
9
4893
by: Harry Smith | last post by:
While reading the documentation on IsStartupScriptRegistered, there is a reference to "client startup script" as "Determines if the client startup script is registered with the Page object." What...
7
2896
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
11
4188
by: pshindle | last post by:
We have several machines currently running the DB2 V7 Run-time Client that we would like to actually be running the App Dev Client. To 'upgrade' (within the same version) this client software can...
2
7556
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
1
3392
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
4
9263
MMcCarthy
by: MMcCarthy | last post by:
http://bytes.com/images/howtos/projectscope_blocks.jpgAs a freelance IT consultant for over 10 years, I’ve come to appreciate well defined project scopes. A project scope is a common understanding...
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.