• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Help Implementing Random Writer/Markov Writer using a HashMap

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9742
80
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 76874
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 76874
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Men call me Jim. Women look past me to this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic