Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Logical Grouping  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I need to develop logic for the requirements like this, suppose I have  10 user objects having

name,sex,group type

Again in group type I have a choice like individual/group from the UI(where user needs to select). If user select "individual" no issue.

1.If user select "group" from the UI then in that I have which type of group he preferred, and in the group how many people allowed and is there any restriction on
male/female? nationality?

I need to develop a logic in a way that in a group of 4 people i need to consider all the above restrictions.

could you please help on this?
 
Rancher
Posts: 786
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the options of the group are not mutually exclusive, you can have 0 to all of them, you should use a checkbox.

In memory use a hashmap for storage.

I'd use a database.
 
Marshal
Posts: 59110
180
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and welcome to the Ranch
 
K kish
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion Les Morgan,It Would be very helpful if you elaborate your answer little bit.
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!