• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 60062
188
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!