Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6.29 duringLab: Tea Party 6.29 duringLab: Tea Party We are having a party with amounts of tea and candy. Return the int outcome of the
6.29 duringLab: Tea Party
6.29 duringLab: Tea Party We are having a party with amounts of tea and candy. Return the int outcome of the party encoded as O=bad, 1=good, or 2=great. A party is good (1) if both tea and candy are at least 5. However, if either tea or candy is at least double the amount of the other one, the party is great (2). However, in all cases, if either tea or candy is less than 5, the party is always bad (0) teaParty(6,8) - 1 teaParty(3,8) 0 teaParty(20,6) 2 287212.1778258 LAB ACTIVITY 6.29.1: duringLab: Tea Party 0/3 Main.java Load default template.. 1 public class Main { public int teaparty(int tea, int candy) { 1* Type your code here. */ } 5 8 9 101 11 // this method not used but needed for testing public static void main(String[] args) { } Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in theStep 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