• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Help Implementing Random Writer/Markov Writer using a HashMap

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends! I hope you all are having a wonderful day!

I was working on my homework assignment and I got stuck. I correctly implemented the program but this is using the wrong data structure.
The assignment specification requests that I implement this program using a HashMap but I am stuck on how to do that.
I have included my source code and a screenshot of the requirements.
How do I implement this assignment using a HashMap instead of the ArrayList method I used?
The program works perfectly but unfortunately it doesn't use a HashMap.


Assignment Requirements/Context: https://imgur.com/a/eWXoI21

Source Code Implementation so far: https://www.paste.org/101623


I would appreciate all and every piece of advice. Thank you!!
 
Saloon Keeper
Posts: 6469
61
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Marvin,
fellow Ranchers are reluctant to click on unknown links. It is preferable to cut and paste text directly into a post.
 
Marshal
Posts: 66637
251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I merged your stuff with the following thread. I hope that is okay by you.
 
Marvin Hozi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends! I hope you all are having a wonderful day!

I was working on my homework assignment and I got stuck. I correctly implemented the program but this is using the wrong data structure.
The assignment specification requests that I implement this program using a HashMap but I am stuck on how to do that.
I have included my source code and a screenshot of the requirements.
How do I implement this assignment using a HashMap instead of the ArrayList method I used?
The program works perfectly but unfortunately it doesn't use a HashMap.

Assignment Requirements/Context: https://imgur.com/a/eWXoI21

I would appreciate all and every piece of advice. Thank you!!

Source Code Implementation so far:



 
Campbell Ritchie
Marshal
Posts: 66637
251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for showing us the code But please don't start a new threa‍d; I have merged you into your old threa‍d.

Please explain very simply what a Markov writer is and how it works. That explanation may be all you need to get your code working. Please tell us how much you know about Maps. Hint: this Java™ Tutorials secion may help you.
 
please buy this thing and then I get a fat cut of the action:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!