Answered step by step
Verified Expert Solution
Link Copied!

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 Partyimage text in transcribed

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 the

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions