Win a copy of Rust Web Development this week in the Other Languages forum!

Jeremy Packer

Greenhorn
+ Follow
since Jul 28, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jeremy Packer

Okay John, I see what this if statement is doing, but since I don't know the categories the user will use, how can i set this up to where it is based on the selected ones?
9 years ago
Could you possibly give me an example with what your talking about? I'm still really new to using enum, and the list's. Just so I have the logic down on it, I would add all restaurants to a huge list, and then if statements for each category confirming them?
9 years ago
Hi John,

What I'm trying to do in the end, is for example, if the Pizza category, and the mexican category are both selected on the GUI, then there will be an array/list that is created with the restaurants of those types and will be added together so I can randomly pull out a restaurant and print it from the selected types.
9 years ago
I'm not sure which would be the best route to take in this sittuation, i've been looking up both options, but I want to be able to group each category in a list so i am able to pull a random value out of it for a randomizing food program. This is what I have so far.

9 years ago
Hi Winston,

So I decided to scrap what I had because I did get boggled down, so this is what I have right now. How would I create an arrayList from the category.Pizza enum?

9 years ago
Hi Campbell,

So to give you a better idea of what i'm working on, I am creating an app that allows the user to select up to six checkboxes(Restaraunt Categories) and will have an array for each category that includes values for each restaurant in the array. After pressing a "help me eat" button, I would like each selected array to be added together and the values transfered to a temporary array so I can then pull a randomized value from the new temporary array giving us a choice from the selected categories. I have the code close to what I need but integrating it with android is really messing with my understanding on the matter. My for loop to create the temp array is wrong and can't figure it out since it could be any combination of categories added together.

I've only taken one class in Java, and this project is a bit out of my understanding but i've spent the past few hours looking up more information about it and am unsure of what the best route to take is. So any criticism /help would be great.

Thank you so much!

9 years ago
I have six arrays that will each be a checkbox. Each will have 5-6 values, I want to be able to click two or three checklists and generate a random value the selected checklist box's values. Would creating a new temp array to hold the clicked categories values, and then pull the random variable from that array be the best route to go?

Thank you!
9 years ago