Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Simple Internet Shop

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody,
I'm very new to Java. It would be nice if anyone could help me build a simple e-com application.
What is in my mind is not a real-time web shop application but a simple client-server program that will run on my small pc.
What I'd like to do is write a multi-threaded server and a client.
Apart from &; I will be having a stock file, say: "stock.txt", whose contents being:
11101X|BMX Cycle Kids|$178.00|12|9
25879A|Tripod Camera|$578.00|4|4
19478P|Acme Road Runner|$318.00|10|8
48221D|GoodGuys Doll Male|$3178.00|2|2
{each item is separated by a pipe(|) symbol. how will i get these loaded into 5 separate columns in the AWT List?}
The headings for the above info will be:
Code, Description, Price, On-Stock, Now Available
The Client:
1. The client part will display a GUI.
2. It should be an Applet based on the AWT classes only in order to allow use on common browsers.
3. An inventory list will be downloaded from the server on startup.
This list will be displayed on the List(AWT) under the above said five labels.
4. Buyers will be able to select items from the list and place them in a shopping cart. They will also be able to remove items from the cart if they change their mind. The total value of the items in the cart will display in the Cart Val field as items are added and removed.
5. When the selection is complete they will then move to the check out and finalise the transaction by entering their personal details, delivery address, credit card number and email address into a second frame that appears. The customer will press a �Commit� button to finalise the sale.
6. When the sale is complete the customer order will be transmitted to the server program.
The server
1. The server program will be multi-threaded to support multiple clients.
2. It can be a character based application.
3. As each client connects the server will transmit the current inventory to the client program where it will be displayed in a list. The inventory is in the text file �stock.txt� which can be loaded to the server on first use. After that the inventory should be saved using Object serialization.
4. The server will adjust the inventory by reducing the number of available items to reflect those ordered. Any changes to the inventory must occur in synchronized methods to maintain the integrity of the data base when different clients attempt simultaneous changes. The stock on hand figure will not change until the goods are despatched.
(We will not include a dispatch function in the server, simply because we are not designing this application for web use).
5. When an inventory change occurs, a new inventory will be broadcast to all connected clients.
6. When an order is received an email will be sent by the server to the address given, to acknowledge receipt of the order and advise on the delivery status.
Ok friends, this is it; what do you think?
Can u help me build it?
Anticipating your reply.
Mary J
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mary Jones,
Please don't post the same question to multiple forums in the Saloon. It just makes it difficult to follow a conversation.
Also, I'm sure Mary Jones is not your real name. While we don't require real display names at JavaRanch, we don't allow obviously fictitious ones either. But you probably noticed that when you registered.
So, Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
closing this -- please put comments in the original thread here:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic