Skip to content

The program implements the similar functionalities of an auction house by offering customers the opportunity to view various products put up for auction, so that later through a broker who retains a commission, they can participate in the auction for various products they want. At the same time the administrators of such a system can add new pro…

License

Notifications You must be signed in to change notification settings

Ionut-Iordache-I/Online-auction-system

Repository files navigation

Online-auction-system

In the implementation of the project I used according to Single Principle Responsibility the classes such as Produs(Product), Angajat(Employee), Client(Customer), Licitatie(Auction). I did the Abstract Employee class with the setClients method which I overwrote in the Broker class because he had a list of clients participating in the auction from him. Also in the Broker class I implemented the commissioning method Clients () which applies various commissions to clients depending on some reference properties of the clients. Because we had the 2 classes that extend Employee, I created the EmployeeFactory class and thus I obtainedn, based on the input of the name in a switch, the desired subclass. Regarding the Product class, I extended it to 3 other classes Tablou(Painting), Bijuterie(Jewelry) and Mobila(Furniture) where I used the classes PaintingBuilder, FurnitureBuilder and JewelryBuilder to implement a second design pattern, namely builder that allows the creation of different representations of a product. Regarding the bidding mechanism, the client makes a request for a product, from where the request is taken over by the auction house which determines a broker at random for the client and checks if the auction can start, if the condition has been met. The condition specify that the number of participants must be equal to that required by a particular auction. after that, the auction that represents a task (task) begins and is represented by the StartLicitation class that implements Runnable. In the run () method for each step of the auction are requested all brokers who in turn request the price from clients who must send this price. I have implemented a method that determines a price that will be auctioned at a certain step by the customer in the sendPrice () method. After that the client sends the determined price to the broker who sends it to the auction house who checks using a HAshMap if the price received is somehow higher than the previous one and thus sets the maximum price. Afterwards, it is checked if the minimum price to be paid for an product is exceeded because otherwise the product would not be sold. Also, the broker's commission is paid here and at the end the auction ends and is removed from the list of active auctions.I have implemented the observer design pattern in order to notify customers of the end of the auction. Because we need to have an auction house, I used the singleton design pattern on this class, which allows the creation of a single instance of that class using the getInstance () method. The commission applied by each broker to his clients at their participation in the auction, was divided into four distinct cases of application of commissions by brokers. In order to randomly generate an amount that the customer can pay for the product at a certain step of the auction, I determined that price as the ASCII code of the first letter of the customer's name to which I later added the specific characters number to this customer's name.

About

The program implements the similar functionalities of an auction house by offering customers the opportunity to view various products put up for auction, so that later through a broker who retains a commission, they can participate in the auction for various products they want. At the same time the administrators of such a system can add new pro…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages