Menu
Question Index
...

Write a program to print the hostel block depending upon the direction of the state the student belongs and whether the student is woman or not. The directions are 'N' for North, 'E' for East, 'W' for West and 'S' for South.

Input (Character, Boolean) Printed Output
'N', false North Men's Block
'E', true East Women's Block
'W', false West Men's Block
'S', true South Women's Block


    
class AssignHostelBlock
{
    public static void main(String s[])
    {
        assignHostelBlock('N', false);

    }


    public static void assignHostelBlock(char direction, boolean woman)
    {
    }

}

Doubts

Problems

Topic: Using Break In for Loop To Exit

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App