Question: Hey I'm having a hard time with this code being display. I was hoping some could help me out. This is a java programmig This
Hey
I'm having a hard time with this code being display. I was hoping some could help me out. This is a java programmig
| This component of the final exam will have two data structures. The two data structures will be a stack and the other will be a hashmap. The hashmap object will be added to the stack every time the user picks an answer. The hashmap will have a key and value. The key will be the timestamp (system time when the user selected a choice) and the value will be the choice the user picked. For example, if the question was Buffalo vs. Pittsburgh and the user picked Buffalo at 10pm, then the timestamp (key) will be 10pm and the value would be Buffalo. This hashmap object will then be added to the stack. You will have a hashmap object for every answer to the questions. Hey what I did:
mport java.util.HashMap; import java.util.Iterator; import java.util.Scanner; import java.util.Stack; public void main (String arg[]){ class user{ private Scanner scan = new Scanner(System.in); private Stack } |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
