Question
1 package ch02.stacks; 2 3 import java.util.Scanner; 4 import java.util.ArrayList; 5 6 7 public class Bid 8 { 9 public String userName; 10 public int
1 package ch02.stacks; 2 3 import java.util.Scanner; 4 import java.util.ArrayList; 5 6 7 public class Bid 8 { 9 public String userName; 10 public int currentBid; 11 public int maxBid; 12 13 public static void main(String[] args) 14 { 15 //Creating object for LinkedStack of type Bid 16 MyExtendsLinkedStack
THIS CODE WORKS FINE. IT ASK USER TO INPUT NAME & VALUE, BUT I WANT PUT HARD CODE. I DO NOT WANT TO ASK USER ANYTHING.
MY HARD CORD WILL BE
DATA:
New Bid | Result | High Bidder | High Bid | Maximum Bid |
7 John | New high bidder | John | 1 | 7 |
5 Hank | High bid increased | John | 5 | 7 |
10 Jill | New high bidder | Jill | 8 | 10 |
8 Thad | No change | Jill | 8 | 10 |
15 Joey | New high bidder | Joey | 11 | 15 |
I WANT TO OUTPUT:
Joey | 11 |
Jill | 8 |
John | 5 |
John | 1 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started