Question: 1. Write a method isVowel() that takes a Strings and an int i as input. The method should return true if the character at

1. Write a method isVowel() that takes a Strings and an int

1. Write a method isVowel() that takes a Strings and an int i as input. The method should return true if the character at index i is a vowel, false otherwise. 2. Write a method reverseConcat() that takes three input parameters of type String (s1, s2, s3). It should return a value of type String equal to the three input Strings concatenated together in reverse order. Call this from your main method and print the result. 3. Write a method chocolateBag() that takes 3 integers as input. The first input indicated the number of small (1 kg) chocolate bars you have, the second the number of big (5 kg) chocolate bars you have, and the third the number of kg of chocolate you want in your bag. The method returns the number of small bars to use to fill the bag, assuming we always use big bars before small bars. It returns -1 if it can't be done. Example: chocolateBag(4, 1, 9) returns 0 chocolate Bag(4,1,10) returns -1 chocolateBag(4, 1, 7) returns 2

Step by Step Solution

3.41 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!