Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use JAVA. How Bidding Works The rules for bidding are as follows: * each item has a reserve price, which is the minimum sale

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Please use JAVA.

How Bidding Works The rules for bidding are as follows: * each item has a reserve price, which is the minimum sale price set by the seller . a bid is discarded if it is less than the reserve price e a bidder specifies the maximum they are willing to bid, called the maximum bid * the current bid is the winning bid at a given time during the auction * the current bid is only as high as needed to exceed the previous current bid; it may be less than the maximum specified by the bidder o a bid is discarded if its maximum is less than the current bid e if a new maximum bid is placed that is higher than the current bid (suppose A is the currently winning bidder, and B is the new bidder): o if the maximum for A is higher than the maximum for B, A is still winning the auction; the new current bid is 1 (maximum of B) o if the maximum for B is higher than the maximum for A, then B is the new winner of the auction; the new current bid is 1 +(maximum of A) Bidding Example Given an auction for "Sample Auction Item", with auction number 256. The auction begins on 12/5/2016 at 7am and ends on 12/8/2016 at 11:59pm with a reserve price of $3. Here is a record of the bidding: Bid Num Winning Bidder Current High Bid Date Time Bid Result Max Bid 112/5/2016 am Sofia 7 new high bidder Sofia 3 7 12:00 current high bid Jim 5 12/5/2016 5:00 Ashok 12/6/201610:00 LiPing 212/5/2016 Sofia 6 7 pm increased new high bidder Ashok 8 10 no change Ashok 8 10 am 8 3:00 Joey new high bidder Joey 5 12/7/201615 15 pm Here is an explanation of the bidding: 1. New Bid: 12/5/2016, 9am, 7 Sofia. (The stack is empty and Sofia's bid is above the reserve price; the high bid at this time needs to match the reserve price. Sofia's bid is added to the stack and she becomes the winning bidder. We track the high bid and the maximum bid.) 2. New Bid: 12/5/2016, 12pm, 5 Jim. (Jim's bid is greater than the reserve price and greater than the current high bid but it is not greater than the current max bid, so Sofia is still winning but her current high bid goes up. Therefore, Jim's bid is discarded and Sofia's bid is updated to be How Bidding Works The rules for bidding are as follows: * each item has a reserve price, which is the minimum sale price set by the seller . a bid is discarded if it is less than the reserve price e a bidder specifies the maximum they are willing to bid, called the maximum bid * the current bid is the winning bid at a given time during the auction * the current bid is only as high as needed to exceed the previous current bid; it may be less than the maximum specified by the bidder o a bid is discarded if its maximum is less than the current bid e if a new maximum bid is placed that is higher than the current bid (suppose A is the currently winning bidder, and B is the new bidder): o if the maximum for A is higher than the maximum for B, A is still winning the auction; the new current bid is 1 (maximum of B) o if the maximum for B is higher than the maximum for A, then B is the new winner of the auction; the new current bid is 1 +(maximum of A) Bidding Example Given an auction for "Sample Auction Item", with auction number 256. The auction begins on 12/5/2016 at 7am and ends on 12/8/2016 at 11:59pm with a reserve price of $3. Here is a record of the bidding: Bid Num Winning Bidder Current High Bid Date Time Bid Result Max Bid 112/5/2016 am Sofia 7 new high bidder Sofia 3 7 12:00 current high bid Jim 5 12/5/2016 5:00 Ashok 12/6/201610:00 LiPing 212/5/2016 Sofia 6 7 pm increased new high bidder Ashok 8 10 no change Ashok 8 10 am 8 3:00 Joey new high bidder Joey 5 12/7/201615 15 pm Here is an explanation of the bidding: 1. New Bid: 12/5/2016, 9am, 7 Sofia. (The stack is empty and Sofia's bid is above the reserve price; the high bid at this time needs to match the reserve price. Sofia's bid is added to the stack and she becomes the winning bidder. We track the high bid and the maximum bid.) 2. New Bid: 12/5/2016, 12pm, 5 Jim. (Jim's bid is greater than the reserve price and greater than the current high bid but it is not greater than the current max bid, so Sofia is still winning but her current high bid goes up. Therefore, Jim's bid is discarded and Sofia's bid is updated to be

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions