I have got this example here to develop in java JDK and run it on DCP,and I have some douts how to do it using the Boolean.
Robert ( male ) is 10, Mary ( female ) is 25 and John ( male ) is 75
Write a program that prints to the screen the information and a colour based on age and gender of each person:
- Children ( age less or equal than 12 )
Male: Light Blue
Female: Light Pink
- Adult ( age between 13 and 50 )
- Senior ( age greater 50 )
Robert ( Children - Male - 10 years old ) colour: Light Blue
Mary.. ( Adult - Female - 25 years old ) colour: Red
John.. ( Senior - Male - 75 years old ) colour: Green
NOTE: The information about each person should come from variables !!! Do NOT hard code it !!!
Thanks in advance for any help.