- Joey Kokinda
- Shawn Lightner
- Benjamin Atkinson
- Stephanie Kulinski
- Vishwa Kamalbabu
- Vocareum: Stephanie Kulinski
- Report: Stephanie Kulinski
- Presentation: Stephanie Kulinski
- Java Development Kit (JDK) 8 or higher
- A Java IDE (IntelliJ IDEA, Eclipse, etc.)
- Navigate to src/com/ah/client/ui/ and run AuctionHouseMain.java
- This will automatically start both the client and server components
- From the login screen, you can:
- Login with an existing account
- Create a new buyer or seller account
- Everytime the test cases are run, the testDb folder must be deleted/cleared beforehand
- The AuctionHouseMain.java file acts as our testing for the GUI and network I/O, since the GUI completely relies on network I/O
- Seller accounts - Full seller account functionality with item listing capabilities
- Buyer accounts - Complete buyer functionality with bidding and messaging
- New user account creation - Registration for both buyer and seller accounts
- Password protected login - Secure login system with password validation
- Account deletion - Both buyers and sellers can delete their accounts
- Item listing creation - Sellers can create listings with details (name, starting bid, duration)
- Item listing deletion - Sellers can remove their listings
- Item search - Buyers can search for items by name
- Bidding system - Complete system with automatic bid increments
- Auction duration timer - Time-based auction expiration with countdown display
- Messaging system - Buyers can message sellers and sellers can respond
- Upload/display item pictures - NOT IMPLEMENTED
- Seller Ratings - Buyers can rate sellers with star system and comments
- Seller store pages - Seller profiles with descriptions and ratings
- Seller search - Buyers can search for sellers by username
- Seller can end auction early - Option for sellers to end auctions before expiration
- "Buy it now" price - Sellers can set immediate purchase prices
- "Buy it now" purchasing - Buyers can use the buy now option
- View previously auctioned items - History of items bid on and sold
-
Enhanced Messaging System
- Conversation view with threading by user
- Message history preservation
- Real-time message updates
-
Financial System
- Balance management for buyers
- Funds verification for bidding
- Adding funds to account
-
UI Improvements
- Tabbed dashboard interfaces
- Real-time data refreshing
- Interactive item listings
-
Search Functionality
- Item search by name
- Seller search by username
- Filtering options for better results
-
Buyer Dashboard Features
- Bid history tracking
- Purchase tracking (including Buy Now items)
- Status indicators for bids (Winning, Outbid, Won)
-
Seller Dashboard Features
- Item management tools
- Buyer communication management
- Sales history tracking
Our Auction House implementation follows a client-server architecture:
-
Client Components
- BuyerClient & SellerClient for communication with server
- Separate UI dashboards for buyers and sellers
- Real-time data synchronization
-
Server Components
- Database for persistent storage
- Client handler for processing requests
- Synchronization mechanisms for data integrity
-
Data Models
- User (abstract base class)
- Buyer and Seller (specialized user types)
- Item (with bidding, timing, and purchase logic)
- Message (for buyer-seller communication)
- Image Support: The system doesn't support item images
- Real-time Notifications: No push notifications for bid updates
- I couldn't figure out a way to update table gui, so user needs to logout and login to refresh the tables.
- Fixed all test cases
- Added requests to networking system
- Running the GUI acts as our main methods to test IO functionality
Compilation and Running
- Clone Repo to desired IDE
- Compile:
javac -d out src/com/ah/database/*.java src/com/ah/interfaces/*.java - Run tests:
java -cp out:lib/junit.jar org.junit.runner.JUnitCore com.ah.tests.SellerTest com.ah.tests.MessageTest com.ah.tests.DatabaseTest com.ah.tests.ItemTest com.ah.tests.BuyerTest - Note: no main, just db and test cases
Submission
- Submitted by: Joey Kokinda, Shawn Lightner, Benjamin Atkinson, Stephanie Kulinski, Vishwa Kamalbabu
- Vocareum: Joey Kokinda
- Manages
items,sellers, andbuyerslists, persisting them todb/items,db/sellers, anddb/buyersas<itemID>.item,<username>.txt, and<username>.buyer. - Creates
db/directories on startup or loads existing data withloadDatabase(). - Thread-safe: Uses
synchronizedblocks on lists for writes and deletes. - Key methods:
getItems(),getSellers(),getBuyers(),write(),delete(),loadDatabase().
Testing:
DatabaseTest: Verifies persistence by writing aSellertodb/sellers/seller1.txtand deleting it, checking file existence.
Relationships:
- Central hub, persisting
Item,Seller, andBuyerobjects. - Used by
SellerandBuyerto access user lists (e.g.,db.getSellers()inSeller.checkUsername()).
- Represents a seller with
username,password,sellerRating,itemIDList,messages, andbalance. - Handles username uniqueness (
checkUsername), login (login), item management (addItemID,deleteItemID), rating updates (setSellerRating), and messaging (sendMessage). - Thread-safe:
sendMessage()usessynchronizedonmessages. - Persisted as
<username>.txtindb/sellers/.
Testing:
SellerTest: Tests creation, getters/setters, username uniqueness, and item list management.
Relationships:
- Depends on
Databasefor persistence and user lists. - Interacts with
BuyerinsendMessage(). - Linked to
ItemviaitemIDListandItem’ssellerfield. - Uses
Messagefor messaging.
- Represents a buyer with
username,password,balance, andmessages. - Includes stubs for
createBuyer,login,deleteSeller(should bedeleteBuyer), andgetBalance. - Supports messaging with
sendMessage()andgetMessages(). - Thread-safe:
sendMessage()usessynchronizedonmessages. - Persisted as
<username>.buyerindb/buyers/.
Testing:
BuyerTest: Placeholder test verifying object creation (incomplete due to time constraints).
Relationships:
- Depends on
Databasefor persistence and to accessSellerlist. - Interacts with
SellerinsendMessage(). - Linked to
ItemviamaxBidderfield. - Uses
Messagefor messaging.
- Represents an auction item with
itemID,name,seller,maxBidder,bidPrice,listingExpiration, etc. - Manages auction state (
updateState), bidding (submitBid), buy-now (setBuyPrice), and search (searchKeyword,searchSeller). - Not thread-safe (to be fixed in Phase 2).
- Persisted as
<itemID>.itemindb/items/.
Testing:
ItemTest: VerifiessubmitBidupdates bid price correctly.
Relationships:
- Depends on
Databasefor persistence. - Linked to
Sellerviasellerfield andBuyerviamaxBidder. - Referenced by
MessageviaitemID.
- Represents a message with
msgID,content,senderID,receiverID, anditemID. - Provides getters;
sendMessage()andgetMessages()are placeholders (logic inSeller/Buyer). - Stored within
SellerandBuyermessageslists. - Thread safety handled by
SellerandBuyer.
Testing:
MessageTest: Verifies sending a message (seller side) and persistence.
Relationships:
- Used by
SellerandBuyerfor messaging. - References
ItemviaitemID. - Persisted via
SellerandBuyer.
Compilation and Running
- Clone Repo to desired IDE
- Compile:
javac -d out src/com/ah/database/*.java src/com/ah/interfaces/*.java - Run tests:
java -cp out:lib/junit.jar org.junit.runner.JUnitCore com.ah.tests.SellerTest com.ah.tests.MessageTest com.ah.tests.DatabaseTest com.ah.tests.ItemTest com.ah.tests.BuyerTest
Submission
- Submitted by: Joey Kokinda, Shawn Lightner, Benjamin Atkinson, Stephanie Kulinski, Vishwa Kamalbabu
- Vocareum: Stephanie Kulinski
User:
- Represents a user and their account with
username,password, anduserFile. - Handles username and password setting (
setUsername) (setPassword), login (login), and user file creation for all buyers and sellers
Testing:
UserTest: Tests creation, getters/setters, and login.
Relationships:
- Superclass for the
SellerandBuyerclasses SellerandBuyernow extendUserto access username, password, and userFile.- Constructor is called from
SellerandBuyerclasses - Seller and buyer classes now interact with the database by calling
add,sync, andremovewhen there is an update to the user account
BuyerClient:
Purpose: Client for buyer interactions with the auction server, handling login, account creation, bidding, and messaging. Functionality:
- login, createAccount, deleteAccount: Manage buyer accounts.
- placeBid: Place bids on items.
- sendMessage: Send messages to sellers about specific items or anything
- getItemsBidOn, getBalance: Retrieve buyers bidding history and balance. Usage: Connects to the server (default localhost).
SellerClient:
Purpose: Client for seller interactions with the auction server, managing items, auctions, and account stuff. Functionality:
- login, createAccount, deleteAccount: Manage seller accounts
- addItem, deleteItem, setBuyPrice, endAuction: Manage items and auctions.
- listItems: List items owned by the seller
- getSellerRating: Retrieve the sellers rating Usage: Connects to the server (default host: localhost, port: 12345). Includes a basic command-line interface for interaction (e.g., create account, add items, list items). SellerClient main method can be run to test functionality. Following successful connection, an integer 0-8 can be input to test the various SellerClient methods as indicated by comments in the main method. All communication methods can be tested in this manner.
Client:
Purpose: Base class for client-server communication, implementing ClientInterface. Functionality:
- connect, disconnect: Establish and close socket connections to the server
- sendRequest: Send requests to the server using ObjectOutputStream and ObjectInputStream
Relationships: BuyerClient and SellerClient extend this class for specific buyer and seller operations
Purpose: Handles client requests for the auction system, including account management, bidding, and messaging.
Classes:
- Server: Listens for incoming client connections on port 4242 and spawns a ClientHandler thread for each client.
- ClientHandler: Processes client requests (e.g., login, create account, send message, place bid) and interacts with the Database.
Functionality:
- Supports buyer and seller account creation, login, and deletion
- Handles messaging between buyers and sellers with handleMessage
- Manages item bidding for buyers with handleBid
- Persists data to the Database /db
Usage:
- Run with java -cp out com.ah.server.Server 4242 db to start the server and listen for client connections
- ClientHandlerTest tests the methods in ClientHandler - the test should print the stack trace for invalid username or password
Purpose: Details the requests made by the client that will be sent to the server
Classes:
- AccountCreationRequest: Request sent when the user wants to create an account
- AccountDeletionRequest: Request sent when the user wants to delete their account
- AuthRequest: Request sent when the user wants to login to their account
- ItemBidRequest: Request sent when the user wants to bid on an item
- MessageRequest: Request sent when the user wants to send a messsage
- Request: Superclass for all messages that contains the message type
- StatusRequest: Request sent when the user wants to see if their bid was a success
Functionality:
- Specifies the type of request/message that is being sent from the client to the server
Relationships:
- All classes in the communication package extend the request class
- The request objects are sent between the client and the server, which call the necessary methods in the database, message, seller, buyer, and item classes based on the message