code in java. please do not copy similar code from the chegg. do your own. Thank you in advance.
Request About This Lab Remember those BuzzFeed quizzes that are named like "Which Marvel hero are you?" or "What brunch item best suits you?". A lot of these quizzes use some kind of conditional check at the end to give you your results (if the answer to #1 was A, and answer to #2 was C, etc... then they are blah). For this lab you will be creating your own version of that Name Requirements Java file name: SortingHat.java Main class name: SortingHat Instructions NOTE - While the instructions for this lab are written in this order, it does not necessarily indicate the order in which you should implement each feature. Approach the project as a whole and think about what you think would be the best approach to implement it. Building software is more like building your own table rather than following the IKEA steps. You need to plan, measure, and assemble - not follow step-by-step instructions. You should always have the end goal in mind, and not get bogged down in each minor detail Get User Input You will need to ask the user the following prompts and have some mariner of using their responses for the boolean conversion, 1. Do you consider yourself brave? 2. Are you the class clown? 3. Are you competitive? 4. Are you a good learner? 5. Do you hold your friends and family above all else? 6. Do you tend to be the leader? Request Convert the input to Boolean We asked the user for yeso answers to the questions. We now need to String compare each input to convert it to a boolean. That is, if the user entered "yes" or "Y" (case insensitive), then the boolean value is true. If they entered "no" or "n" (case insensitive), then the boolean value is false. Don't worry about error handling or asking the user to retry if they make a typo - just treat those as "false". Calculate & Display the Results Now that we have the responses converted from the user, we need to figure out which Hogwarts house they go into and display it: If someone is brave and puts family & friends above all else or tends to be the leader, then they are Gryffindor If someone is not the class clown and tend to be competitive, then they are Slytherin If someone is a good learner or competitive and are brave but not the leader, then they . . are Ravenclaw . If someone is the class clown and is not brave and does not tend to be the leader, then they are Hufflepuff Once we have the user's house, simply print out a statement announcing it (ie: "Congratulations, you are House Ravenclaw!")