Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a method public void printInOrder( int a, int b, int c ) that takes as its arguments three integers and prints them out

1. Write a method

public void printInOrder( int a, int b, int c )

that takes as its arguments three integers and prints them out in increasing order (i.e., the smallest first)

2. Write a method

public void printAgeGroup( int age )

that takes an integer age as its argument and prints one of the following messages to the console depending on the value of age:

print "infant" if age is equal to 1

print "toddler" if age is equal to 2 or 3

print "preschooler" if age is equal to 4

print "kindergartener" if age is equal to 5

print "elementary age" if age is equal to 6, 7, 8, 9 or 10

print "middle schooler" if age is equal to 11, 12 or 13

print "high schooler" if age is equal to 14, 15, 16, or 17

print "too cool" if age is equal to 18 print "old" if age is greater than 18

3. Write a method

public int findSmallest( int [ ] array )

that returns the smallest element in the provided array

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions