Question: 1) Given the following method public double averageGrade) { double total = 0; for (int i = 0; i elements) { for (int outer .e;

 1) Given the following method public double averageGrade) { double total

= 0; for (int i = 0; i elements) { for (int

1) Given the following method public double averageGrade) { double total = 0; for (int i = 0; i elements) { for (int outer .e; outer return false; } a. Provide the equation for the number of operations (you may use n for the number of elements) b. What is the 0() of this equation ? 3) Given the following method boolean containsValue(ArrayList elements , String first, String second) for (int count = 0; count elements.size(): count++) { if (elenents.get(count).equals(first)) { return true; > > for (int count = 0; count elements.size(); count++) { if (elements.get(count).equals(second)) { return true; > return false; ) a. Provide the equation for the number of operations (you may use n for the number of elements) b. What is the O() of this equation ? 4) Given the following method public String getletterGrade (double avg ) { if(avg > 90) { return "A"; } if(avg > 80) { return "B"; } if(avg > 70) { return "C"; } return "D"; } a. Provide the equation for the number of operations (you may use n for the number of elements) b. What is the o() of this equation

Step by Step Solution

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 Databases Questions!