package construction;
public class Bid{ private String contractor; private float price; public Bid(String contractor, float price) { this.contractor = contractor; this.price = price; } public String getContractor() { return contractor; } public float getPrice() { return price; }}
package construction;public class ContractorBids{
// assume proper variables and other methods are here public void winningBid(Bid[] bids, int numBids){ /**************************** * your code would go here * ****************************/ }}
You are doing renovations on your building, and multiplecontractors have given bids. Given the above Bidand ContractorBids class, write code that shouldgo in the area marked * your code would go here * to complete the“winningBid(Bid[] bids, int numBids)†method. Theoutput should be printed to the console (screen). There arenumBids Bids in the arrayBid[] bids. These items are in locations0 to numBids - 1 of thearray.
Each Bid item should have itscontractor and price output on asingle line. There will be marks for properly right justifying theprice and outputting two decimals. As you areprinting the Bid objects, you should keep track ofthe Bid object with the lowest price. At the endprint the contractor name followed by the price, a finder's fee of10% and the total price.  For example, if theBid array had 3 Bids, a Carl'sConstruction with $40 000, a Pat's Paving for $50 000, and Debbie'sDemolition for $30 000, we would get the following output.
Top Bids:
Carl's Construction 40000.00
Pat's Paving 50000.00
Debbie's Demolition     30000.00
The winning bid goes to Debbie's Demolition.
Price: $30000.00 Finder's Fee: $3000.00 Total: $33000.00