Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Task in Java: We are using CodeJudge, which automatically gives points of the tests (I've uploaded the expected results below). Language: Java Exercise Three
Programming Task in Java:
We are using CodeJudge, which automatically gives points of the tests (I've uploaded the expected results below). Language: Java Exercise Three siblings Anderson, Linda, and Orian, just got their Christmas presents. Anderson gets jealous if both Linda and Orian has more presents than her. Linda gets jealous if Anderson has more presents than her. Orian gets jealous if Anderson or Linda (or both) has more presents than him. Given the number of presents each of the three siblings has, give an algorithm that returns the names of the siblings that gets jealous, or NONE if none of the siblings gets jealous. Program Make a program that: from standard input reads the number of presents each of the three siblings has, computes which of them that gets jealous, write the result to standard output Input format: Line 1: 3 space separated integers: A, L, and o, which are the number of presents that Anderson, Linda, and Orian has, respectively. Output format: One line for each sibling that gets jealous. If there is more than one name, they have to be in alphabetical order. If none of the sibling gets jealous output NONE. Test01 Input (stdin) 4.56 Output Your Output Expected Output Anderson 2 Test02 Input (stdin) 813 Output Your Output 1 Expected Output Linda Orian 3 Test03 Input (stdin) 778 Output Error: expected NONE but was EOF Your Output Expected Output NONE 1 2 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started